renamed packages from 'google' to 'apache' and updated necessary imports
This commit is contained in:
committed by
Edward Capriolo
parent
6a35db7cb9
commit
968203e8a0
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip;
|
package org.apache.gossip;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip;
|
package org.apache.gossip;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
@ -15,18 +15,17 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip;
|
package org.apache.gossip;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.gossip.event.GossipListener;
|
||||||
|
import org.apache.gossip.manager.GossipManager;
|
||||||
|
import org.apache.gossip.manager.random.RandomGossipManager;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import com.google.code.gossip.event.GossipListener;
|
|
||||||
import com.google.code.gossip.manager.GossipManager;
|
|
||||||
import com.google.code.gossip.manager.random.RandomGossipManager;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This object represents the service which is responsible for gossiping with other gossip members.
|
* This object represents the service which is responsible for gossiping with other gossip members.
|
||||||
*
|
*
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip;
|
package org.apache.gossip;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In this object the settings used by the GossipService are held.
|
* In this object the settings used by the GossipService are held.
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip;
|
package org.apache.gossip;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip;
|
package org.apache.gossip;
|
||||||
|
|
||||||
import javax.management.NotificationListener;
|
import javax.management.NotificationListener;
|
||||||
|
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip;
|
package org.apache.gossip;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The object represents a gossip member with the properties as received from a remote gossip
|
* The object represents a gossip member with the properties as received from a remote gossip
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip;
|
package org.apache.gossip;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
@ -15,9 +15,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip.event;
|
package org.apache.gossip.event;
|
||||||
|
|
||||||
import com.google.code.gossip.GossipMember;
|
import org.apache.gossip.GossipMember;
|
||||||
|
|
||||||
public interface GossipListener {
|
public interface GossipListener {
|
||||||
void gossipEvent(GossipMember member, GossipState state);
|
void gossipEvent(GossipMember member, GossipState state);
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip.event;
|
package org.apache.gossip.event;
|
||||||
|
|
||||||
public enum GossipState {
|
public enum GossipState {
|
||||||
UP("up"), DOWN("down");
|
UP("up"), DOWN("down");
|
@ -15,17 +15,17 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip.examples;
|
package org.apache.gossip.examples;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.code.gossip.GossipMember;
|
import org.apache.gossip.GossipMember;
|
||||||
import com.google.code.gossip.GossipService;
|
import org.apache.gossip.GossipService;
|
||||||
import com.google.code.gossip.GossipSettings;
|
import org.apache.gossip.GossipSettings;
|
||||||
import com.google.code.gossip.RemoteGossipMember;
|
import org.apache.gossip.RemoteGossipMember;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is an example of how one could use the gossip service. Here we start multiple gossip
|
* This class is an example of how one could use the gossip service. Here we start multiple gossip
|
@ -15,14 +15,14 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip.manager;
|
package org.apache.gossip.manager;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
import com.google.code.gossip.GossipService;
|
import org.apache.gossip.GossipService;
|
||||||
import com.google.code.gossip.LocalGossipMember;
|
import org.apache.gossip.LocalGossipMember;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [The active thread: periodically send gossip request.] The class handles gossiping the membership
|
* [The active thread: periodically send gossip request.] The class handles gossiping the membership
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip.manager;
|
package org.apache.gossip.manager;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -33,12 +33,12 @@ import javax.management.NotificationListener;
|
|||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import com.google.code.gossip.GossipMember;
|
import org.apache.gossip.GossipMember;
|
||||||
import com.google.code.gossip.GossipService;
|
import org.apache.gossip.GossipService;
|
||||||
import com.google.code.gossip.GossipSettings;
|
import org.apache.gossip.GossipSettings;
|
||||||
import com.google.code.gossip.LocalGossipMember;
|
import org.apache.gossip.LocalGossipMember;
|
||||||
import com.google.code.gossip.event.GossipListener;
|
import org.apache.gossip.event.GossipListener;
|
||||||
import com.google.code.gossip.event.GossipState;
|
import org.apache.gossip.event.GossipState;
|
||||||
|
|
||||||
public abstract class GossipManager extends Thread implements NotificationListener {
|
public abstract class GossipManager extends Thread implements NotificationListener {
|
||||||
|
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip.manager;
|
package org.apache.gossip.manager;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.DatagramPacket;
|
import java.net.DatagramPacket;
|
||||||
@ -27,12 +27,12 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
|
import org.apache.gossip.GossipMember;
|
||||||
|
import org.apache.gossip.GossipService;
|
||||||
|
import org.apache.gossip.model.ActiveGossipMessage;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.codehaus.jackson.map.ObjectMapper;
|
import org.codehaus.jackson.map.ObjectMapper;
|
||||||
import com.google.code.gossip.GossipMember;
|
import org.apache.gossip.RemoteGossipMember;
|
||||||
import com.google.code.gossip.GossipService;
|
|
||||||
import com.google.code.gossip.RemoteGossipMember;
|
|
||||||
import com.google.code.gossip.model.ActiveGossipMessage;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [The passive thread: reply to incoming gossip request.] This class handles the passive cycle,
|
* [The passive thread: reply to incoming gossip request.] This class handles the passive cycle,
|
@ -15,16 +15,16 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip.manager.impl;
|
package org.apache.gossip.manager.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.code.gossip.GossipMember;
|
import org.apache.gossip.GossipMember;
|
||||||
import com.google.code.gossip.GossipService;
|
import org.apache.gossip.GossipService;
|
||||||
import com.google.code.gossip.LocalGossipMember;
|
import org.apache.gossip.LocalGossipMember;
|
||||||
import com.google.code.gossip.RemoteGossipMember;
|
import org.apache.gossip.RemoteGossipMember;
|
||||||
import com.google.code.gossip.manager.GossipManager;
|
import org.apache.gossip.manager.GossipManager;
|
||||||
import com.google.code.gossip.manager.PassiveGossipThread;
|
import org.apache.gossip.manager.PassiveGossipThread;
|
||||||
|
|
||||||
public class OnlyProcessReceivedPassiveGossipThread extends PassiveGossipThread {
|
public class OnlyProcessReceivedPassiveGossipThread extends PassiveGossipThread {
|
||||||
|
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip.manager.impl;
|
package org.apache.gossip.manager.impl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.DatagramPacket;
|
import java.net.DatagramPacket;
|
||||||
@ -24,15 +24,14 @@ import java.net.InetAddress;
|
|||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.gossip.GossipService;
|
||||||
|
import org.apache.gossip.LocalGossipMember;
|
||||||
|
import org.apache.gossip.manager.ActiveGossipThread;
|
||||||
|
import org.apache.gossip.manager.GossipManager;
|
||||||
|
import org.apache.gossip.model.ActiveGossipMessage;
|
||||||
|
import org.apache.gossip.model.GossipMember;
|
||||||
import org.codehaus.jackson.map.ObjectMapper;
|
import org.codehaus.jackson.map.ObjectMapper;
|
||||||
|
|
||||||
import com.google.code.gossip.GossipService;
|
|
||||||
import com.google.code.gossip.LocalGossipMember;
|
|
||||||
import com.google.code.gossip.manager.ActiveGossipThread;
|
|
||||||
import com.google.code.gossip.manager.GossipManager;
|
|
||||||
import com.google.code.gossip.model.ActiveGossipMessage;
|
|
||||||
import com.google.code.gossip.model.GossipMember;
|
|
||||||
|
|
||||||
abstract public class SendMembersActiveGossipThread extends ActiveGossipThread {
|
abstract public class SendMembersActiveGossipThread extends ActiveGossipThread {
|
||||||
|
|
||||||
protected ObjectMapper om = new ObjectMapper();
|
protected ObjectMapper om = new ObjectMapper();
|
@ -15,15 +15,15 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip.manager.random;
|
package org.apache.gossip.manager.random;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.google.code.gossip.GossipService;
|
import org.apache.gossip.GossipService;
|
||||||
import com.google.code.gossip.LocalGossipMember;
|
import org.apache.gossip.LocalGossipMember;
|
||||||
import com.google.code.gossip.manager.GossipManager;
|
import org.apache.gossip.manager.GossipManager;
|
||||||
import com.google.code.gossip.manager.impl.SendMembersActiveGossipThread;
|
import org.apache.gossip.manager.impl.SendMembersActiveGossipThread;
|
||||||
|
|
||||||
public class RandomActiveGossipThread extends SendMembersActiveGossipThread {
|
public class RandomActiveGossipThread extends SendMembersActiveGossipThread {
|
||||||
|
|
@ -15,19 +15,19 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.code.gossip.manager.random;
|
package org.apache.gossip.manager.random;
|
||||||
|
|
||||||
import com.google.code.gossip.GossipMember;
|
import org.apache.gossip.GossipMember;
|
||||||
import com.google.code.gossip.GossipSettings;
|
import org.apache.gossip.GossipSettings;
|
||||||
import com.google.code.gossip.event.GossipListener;
|
import org.apache.gossip.event.GossipListener;
|
||||||
import com.google.code.gossip.manager.GossipManager;
|
import org.apache.gossip.manager.GossipManager;
|
||||||
import com.google.code.gossip.manager.impl.OnlyProcessReceivedPassiveGossipThread;
|
import org.apache.gossip.manager.impl.OnlyProcessReceivedPassiveGossipThread;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class RandomGossipManager extends GossipManager {
|
public class RandomGossipManager extends GossipManager {
|
||||||
public RandomGossipManager(String cluster, String address, int port, String id,
|
public RandomGossipManager(String cluster, String address, int port, String id,
|
||||||
GossipSettings settings, List<GossipMember> gossipMembers, GossipListener listener) {
|
GossipSettings settings, List<GossipMember> gossipMembers, GossipListener listener) {
|
||||||
super(OnlyProcessReceivedPassiveGossipThread.class, RandomActiveGossipThread.class, cluster,
|
super(OnlyProcessReceivedPassiveGossipThread.class, RandomActiveGossipThread.class, cluster,
|
||||||
address, port, id, settings, gossipMembers, listener);
|
address, port, id, settings, gossipMembers, listener);
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.google.code.gossip.model;
|
package org.apache.gossip.model;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,4 +1,4 @@
|
|||||||
package com.google.code.gossip.model;
|
package org.apache.gossip.model;
|
||||||
|
|
||||||
public class GossipMember {
|
public class GossipMember {
|
||||||
|
|
@ -31,12 +31,12 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import com.google.code.gossip.GossipMember;
|
import org.apache.gossip.GossipMember;
|
||||||
import com.google.code.gossip.GossipService;
|
import org.apache.gossip.GossipService;
|
||||||
import com.google.code.gossip.GossipSettings;
|
import org.apache.gossip.GossipSettings;
|
||||||
import com.google.code.gossip.RemoteGossipMember;
|
import org.apache.gossip.RemoteGossipMember;
|
||||||
import com.google.code.gossip.event.GossipListener;
|
import org.apache.gossip.event.GossipListener;
|
||||||
import com.google.code.gossip.event.GossipState;
|
import org.apache.gossip.event.GossipState;
|
||||||
|
|
||||||
public class ShutdownDeadtimeTest {
|
public class ShutdownDeadtimeTest {
|
||||||
|
|
||||||
|
@ -17,10 +17,10 @@
|
|||||||
*/
|
*/
|
||||||
package io.teknek.gossip;
|
package io.teknek.gossip;
|
||||||
|
|
||||||
import com.google.code.gossip.GossipMember;
|
import org.apache.gossip.GossipMember;
|
||||||
import com.google.code.gossip.GossipService;
|
import org.apache.gossip.GossipService;
|
||||||
import com.google.code.gossip.GossipSettings;
|
import org.apache.gossip.GossipSettings;
|
||||||
import com.google.code.gossip.StartupSettings;
|
import org.apache.gossip.StartupSettings;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -30,12 +30,12 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import com.google.code.gossip.GossipMember;
|
import org.apache.gossip.GossipMember;
|
||||||
import com.google.code.gossip.GossipService;
|
import org.apache.gossip.GossipService;
|
||||||
import com.google.code.gossip.GossipSettings;
|
import org.apache.gossip.GossipSettings;
|
||||||
import com.google.code.gossip.RemoteGossipMember;
|
import org.apache.gossip.RemoteGossipMember;
|
||||||
import com.google.code.gossip.event.GossipListener;
|
import org.apache.gossip.event.GossipListener;
|
||||||
import com.google.code.gossip.event.GossipState;
|
import org.apache.gossip.event.GossipState;
|
||||||
|
|
||||||
public class TenNodeThreeSeedTest {
|
public class TenNodeThreeSeedTest {
|
||||||
private static final Logger log = Logger.getLogger( TenNodeThreeSeedTest.class );
|
private static final Logger log = Logger.getLogger( TenNodeThreeSeedTest.class );
|
||||||
|
Reference in New Issue
Block a user