geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject [04/51] [partial] incubator-geode git commit: GEODE-77 removing the old jgroups subproject
Date Fri, 21 Aug 2015 21:22:28 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b2ea77d/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/RingToken.java
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/RingToken.java b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/RingToken.java
deleted file mode 100644
index 3d0de11..0000000
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/RingToken.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/** Notice of modification as required by the LGPL
- *  This file was modified by Gemstone Systems Inc. on
- *  $Date$
- **/
-//$Id: RingToken.java,v 1.5 2004/09/15 17:40:59 belaban Exp $
-
-package com.gemstone.org.jgroups.protocols.ring;
-
-import com.gemstone.org.jgroups.Address;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.Collection;
-import java.util.TreeSet;
-
-
-public class RingToken implements Externalizable
-{
-
-   public static final int OPERATIONAL = 0;
-   public static final int RECOVERY = 1;
-
-   private int type = -1;
-   private long tokenSeq;
-   private long seq;
-   private long aru;
-   private int fcc;
-   private int backlog;
-   private int windowSize;
-   private int windowThreshold;
-   private Address aruId;
-   private Collection retransmissionRequests;
-   private Collection recoveredMembers;
-
-   public RingToken()
-   {
-      this(OPERATIONAL);
-   }
-
-   public RingToken(int type)
-   {
-      if (type != OPERATIONAL && type != RECOVERY)
-      {
-         throw new IllegalArgumentException("Illegal Ring type");
-      }
-      this.type = type;
-      initToken();
-   }
-
-   private void initToken()
-   {
-      retransmissionRequests = new TreeSet();
-   }
-
-   public void setAruId(Address address)
-   {
-      aruId= address;
-   }
-
-   public Address getAruId()
-   {
-      return aruId;
-   }
-
-   public int getType()
-   {
-      return type;
-   }
-
-   public void setType(int type)
-   {
-      if (type != OPERATIONAL && type != RECOVERY)
-      {
-         throw new IllegalArgumentException("Illegal Ring type");
-      }
-      this.type = type;
-
-   }
-
-
-   public long getTokenSequence()
-   {
-      return tokenSeq;
-   }
-
-   public void incrementTokenSequence()
-   {
-      tokenSeq++;
-   }
-
-   public long getHighestSequence()
-   {
-      return seq;
-   }
-
-   public void setHighestSequence(long highestSequence)
-   {
-      if (seq > highestSequence)
-         throw new IllegalArgumentException("Can not set highest sequence to be" +
-                                            " lower than current higest sequence " + seq);
-      this.seq = highestSequence;
-   }
-
-   public long getAllReceivedUpto()
-   {
-      return aru;
-   }
-
-   public void setAllReceivedUpto(long aru)
-   {
-      this.aru = aru;
-
-      if (aru > seq)
-      {
-         seq = aru;
-      }
-   }
-
-   public int getLastRoundBroadcastCount()
-   {
-      return fcc;
-   }
-
-   public void addLastRoundBroadcastCount(int transmitCount)
-   {
-      this.fcc += transmitCount;
-      if (fcc < 0)
-         fcc = 0;
-   }
-
-   public int getBacklog()
-   {
-      return backlog;
-   }
-
-   public void addBacklog(int back)
-   {
-      this.backlog += back;
-
-      if (backlog < 0) backlog = 0;
-   }
-
-   public void setWindowSize(int newSize)
-   {
-      if (newSize < 0)
-      {
-         windowSize = 0;
-      }
-      else
-      {
-         windowSize = newSize;
-      }
-   }
-
-   public void addRecoveredMember(Address member)
-   {
-
-      if (recoveredMembers == null)
-         recoveredMembers = new TreeSet();
-
-      recoveredMembers.add(member);
-   }
-
-   public Collection getRecoveredMembers()
-   {
-      return recoveredMembers;
-   }
-
-   public int getWindowSize()
-   {
-      return windowSize;
-   }
-
-   public void setWindowThreshold(int newSize)
-   {
-      if (newSize < 0)
-      {
-         windowThreshold = 0;
-      }
-      else
-      {
-         windowThreshold = newSize;
-      }
-   }
-
-   public int getWindowThreshold()
-   {
-      return windowThreshold;
-   }
-
-   public Collection getRetransmissionRequests()
-   {
-      return retransmissionRequests;
-   }
-
-   public void writeExternal(ObjectOutput oo) throws IOException
-   {
-      oo.writeLong(tokenSeq);
-      oo.writeLong(seq);
-      oo.writeInt(type);
-      oo.writeLong(aru);
-      oo.writeInt(fcc);
-      oo.writeInt(backlog);
-      oo.writeInt(windowSize);
-      oo.writeInt(windowThreshold);
-      oo.writeObject(aruId);
-      oo.writeObject(retransmissionRequests);
-      oo.writeObject(recoveredMembers);
-
-   }
-
-   public void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException
-   {
-      tokenSeq = oi.readLong();
-      seq = oi.readLong();
-      type = oi.readInt();
-      aru = oi.readLong();
-      fcc = oi.readInt();
-      backlog = oi.readInt();
-      windowSize = oi.readInt();
-      windowThreshold = oi.readInt();
-      aruId = (Address)oi.readObject();
-      retransmissionRequests = (Collection) oi.readObject();
-      recoveredMembers = (Collection) oi.readObject();
-   }
-
-   @Override // GemStoneAddition
-   public String toString()
-   {
-      StringBuffer buf = new StringBuffer(200);
-      buf.append("Token[tokenSeq=").append(tokenSeq);
-      buf.append(",type=").append(type);
-      buf.append(",highestseq=").append(seq);
-      buf.append(",aru=").append(aru);
-      buf.append(",lastRoundTransmitCount=").append(fcc);
-      buf.append(",backlog=").append(backlog);
-      buf.append(",windowSize=").append(windowSize);
-      buf.append(",windowThreshold=").append(windowThreshold);
-      buf.append(",retransmissionList=").append(getRetransmissionRequests());
-      buf.append(']');
-      return buf.toString();
-   }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b2ea77d/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/TcpRingNode.java
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/TcpRingNode.java b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/TcpRingNode.java
deleted file mode 100644
index ac16b3c..0000000
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/TcpRingNode.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/** Notice of modification as required by the LGPL
- *  This file was modified by Gemstone Systems Inc. on
- *  $Date$
- **/
-//$Id: TcpRingNode.java,v 1.4 2005/08/08 12:45:41 belaban Exp $
-
-package com.gemstone.org.jgroups.protocols.ring;
-
-import com.gemstone.org.jgroups.util.GemFireTracer;
-import com.gemstone.org.jgroups.util.ExternalStrings;
-import com.gemstone.org.jgroups.Address;
-import com.gemstone.org.jgroups.SuspectedException;
-import com.gemstone.org.jgroups.TimeoutException;
-import com.gemstone.org.jgroups.blocks.GroupRequest;
-import com.gemstone.org.jgroups.stack.IpAddress;
-import com.gemstone.org.jgroups.stack.RpcProtocol;
-import com.gemstone.org.jgroups.util.Util;
-
-import java.io.*;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.Vector;
-
-
-public class TcpRingNode implements RingNode
-{
-
-   final ServerSocket tokenReceiver;
-   Socket previous,next;
-   final Address thisNode;
-     Address nextNode;
-   ObjectInputStream ios;
-   ObjectOutputStream oos;
-   final RpcProtocol rpcProtocol;
-   static/*GemStoneAddition*/ final boolean failedOnTokenLostException = false;
-
-   final Object socketMutex = new Object();
-    protected final GemFireTracer log=GemFireTracer.getLog(this.getClass());
-
-   public TcpRingNode(RpcProtocol owner, Address memberAddress)
-   {
-      tokenReceiver = Util.createServerSocket(12000);
-      rpcProtocol = owner;
-      thisNode = memberAddress;
-      nextNode = null;
-   }
-
-   public IpAddress getTokenReceiverAddress()
-   {
-      return new IpAddress(tokenReceiver.getLocalPort());
-   }
-
-   public Object receiveToken(int timeout) throws TokenLostException
-   {
-      RingToken token = null;
-      Address wasNextNode = nextNode;
-      try
-      {
-         if (previous == null)
-         {
-            previous = tokenReceiver.accept();
-            ios = new ObjectInputStream((previous.getInputStream()));
-
-         }
-         previous.setSoTimeout(timeout);
-         token = new RingToken();
-         token.readExternal(ios);
-      }
-      catch (InterruptedIOException io)
-      {
-         //read was blocked for more than a timeout, assume token lost
-         throw new TokenLostException(io.getMessage(), io, wasNextNode, TokenLostException.WHILE_RECEIVING);
-      }
-      catch (ClassNotFoundException cantHappen)
-      {
-      }
-      catch (IOException ioe)
-      {
-         closeSocket(previous);
-         previous = null;
-         if (ios != null)
-         {
-            try
-            {
-               ios.close();
-            }
-            catch (IOException ignored)
-            {
-            }
-         }
-
-         token = (RingToken) receiveToken(timeout);
-      }
-      return token;
-   }
-
-   public Object receiveToken() throws TokenLostException
-   {
-      return receiveToken(0);
-   }
-
-   public void passToken(Object token) throws TokenLostException
-   {
-      synchronized (socketMutex)
-      {
-         try
-         {
-            ((Externalizable)token).writeExternal(oos);
-            oos.flush();
-            oos.reset();
-         }
-         catch (IOException e)
-         {
-            e.printStackTrace();
-            //something went wrong with the next neighbour while it was receiving
-            //token, assume token lost
-            throw new TokenLostException(e.getMessage(), e, nextNode, TokenLostException.WHILE_SENDING);
-         }
-
-      }
-   }
-
-   public void tokenArrived(Object token)
-   {
-      //not needed , callback for udp ring
-   }
-
-   public void reconfigureAll(Vector newMembers)
-   {
-
-   }
-
-
-   public void reconfigure(Vector newMembers)
-   {
-
-      if (isNextNeighbourChanged(newMembers))
-      {
-         IpAddress tokenReceiverAddress = null; // GemStoneModification
-         synchronized (socketMutex)
-         {
-            nextNode = getNextNode(newMembers);
-
-               if(log.isInfoEnabled()) log.info(ExternalStrings.TcpRingNode_NEXT_NODE__0, nextNode);
-
-            try
-            {
-               tokenReceiverAddress = (IpAddress) rpcProtocol.callRemoteMethod(nextNode, "getTokenReceiverAddress", GroupRequest.GET_FIRST, 0);
-            }
-            catch (TimeoutException tim)
-            {
-               if(log.isErrorEnabled()) log.error(ExternalStrings.TcpRingNode_TIMEOUTED_WHILE_DOING_RPC_CALL_GETTOKENRECEIVERADDRESS_0, tim);
-               tim.printStackTrace();
-            }
-            catch (SuspectedException sus)
-            {
-               if(log.isErrorEnabled()) log.error(ExternalStrings.TcpRingNode_SUSPECTED_NODE_WHILE_DOING_RPC_CALL_GETTOKENRECEIVERADDRESS_0, sus);
-               sus.printStackTrace();
-            }
-            try
-            {
-               closeSocket(next);
-               next = new Socket(tokenReceiverAddress.getIpAddress(), tokenReceiverAddress.getPort());
-               next.setTcpNoDelay(true);
-               oos = new ObjectOutputStream(next.getOutputStream());
-            }
-            catch (IOException ioe)
-            {
-               if(log.isErrorEnabled()) log.error(ExternalStrings.TcpRingNode_COULD_NOT_CONNECT_TO_NEXT_NODE__0, ioe);
-               ioe.printStackTrace();
-            }
-         }
-      }
-   }
-
-   private void closeSocket(Socket socket)
-   {
-      if (socket == null) return;
-      try
-      {
-         socket.close();
-      }
-      catch (IOException ioe)
-      {
-         ioe.printStackTrace();
-      }
-
-   }
-
-   private boolean isNextNeighbourChanged(Vector newMembers)
-   {
-      Address oldNeighbour = nextNode;
-      Address newNeighbour = getNextNode(newMembers);
-      return !(newNeighbour.equals(oldNeighbour));
-   }
-
-   private Address getNextNode(Vector otherNodes)
-   {
-      int myIndex = otherNodes.indexOf(thisNode);
-      return (myIndex == otherNodes.size() - 1)?
-            (Address) otherNodes.firstElement():
-            (Address) otherNodes.elementAt(myIndex + 1);
-
-   }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b2ea77d/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/TokenLostException.java
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/TokenLostException.java b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/TokenLostException.java
deleted file mode 100644
index 1c3a323..0000000
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/TokenLostException.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/** Notice of modification as required by the LGPL
- *  This file was modified by Gemstone Systems Inc. on
- *  $Date$
- **/
-//$Id: TokenLostException.java,v 1.3 2004/09/15 17:40:59 belaban Exp $
-
-package com.gemstone.org.jgroups.protocols.ring;
-
-import com.gemstone.org.jgroups.Address;
-
-import java.io.InterruptedIOException;
-
-public class TokenLostException extends InterruptedIOException
-{
-   private static final long serialVersionUID = -7870593672874341816L;
-
-   public static final int UNDEFINED = 0;
-   public static final int WHILE_RECEIVING = 1;
-   public static final int WHILE_SENDING =2;
-
-   protected Address failedNode;
-   protected Throwable cause;
-   protected int mode = UNDEFINED;
-
-   public TokenLostException()
-   {
-      super();
-   }
-   public TokenLostException(String message)
-   {
-      super(message);
-   }
-
-   public TokenLostException(String message,Throwable cause,Address failedNode, int mode)
-   {
-      super();
-      this.failedNode = failedNode;
-      this.mode = mode;
-   }
-
-   public int getFailureMode()
-   {
-      return mode;
-   }
-
-   public Address getFailedNode()
-   {
-      return failedNode;
-   }
-
-   @Override // GemStoneAddition
-   public String toString()
-   {
-      StringBuffer buf = new StringBuffer();
-      buf.append("TokenLostException[");
-      buf.append("cause=").append(cause);
-      buf.append(",failedNode=").append(failedNode);
-
-      buf.append(']');
-      return buf.toString();
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b2ea77d/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/package.html
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/package.html b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/package.html
deleted file mode 100644
index a103009..0000000
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/protocols/ring/package.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<HTML>
-	<BODY>
-		Supports protocols in ring networks.
-	</BODY>
-</HTML>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b2ea77d/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/spi/GFBasicAdapter.java
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/spi/GFBasicAdapter.java b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/spi/GFBasicAdapter.java
deleted file mode 100755
index 8813e53..0000000
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/spi/GFBasicAdapter.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.gemstone.org.jgroups.spi;
-
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Properties;
-
-import com.gemstone.org.jgroups.Message;
-import com.gemstone.org.jgroups.stack.IpAddress;
-import com.gemstone.org.jgroups.util.SockCreator;
-
-public interface GFBasicAdapter {
-    void invokeToData(Object obj, DataOutput out) throws IOException;
-
-    void writeObject(Object obj, DataOutput out) throws IOException;
-
-    void invokeFromData(Object obj, DataInput in) throws IOException, ClassNotFoundException;
-
-    <T> T readObject(DataInput in) throws IOException, ClassNotFoundException;
-
-    short getMulticastVersionOrdinal();
-
-    short getSerializationVersionOrdinal(short version);
-
-    short getCurrentVersionOrdinal();
-
-    byte[] serializeWithVersion(Object obj, int destVersionOrdinal);
-
-    void serializeJGMessage(Message message, DataOutputStream out) throws IOException;
-
-    void deserializeJGMessage(Message message, DataInputStream in) throws IOException, IllegalAccessException, InstantiationException;
-
-    ObjectOutput getObjectOutput(DataOutputStream out) throws IOException;
-
-    ObjectInput getObjectInput(DataInputStream in) throws IOException;
-
-    void writeString(String str, DataOutput out) throws IOException ;
-
-    String readString(DataInput in) throws IOException;
-
-    void writeStringArray(String[] strings, DataOutput out) throws IOException;
-
-    String[] readStringArray(DataInput in) throws IOException;
-
-    DataOutputStream getVersionedDataOutputStream(DataOutputStream dos, short version) throws IOException;
-
-    DataInputStream getVersionedDataInputStream(DataInputStream instream,
-        short version) throws IOException;
-
-    byte[] readByteArray(DataInput in) throws IOException;
-
-    void writeByteArray(byte[] array, DataOutput out) throws IOException;
-
-    void writeProperties(Properties props, DataOutput oos) throws IOException;
-
-    Properties readProperties(DataInput in) throws IOException, ClassNotFoundException;
-
-    int getGossipVersionForOrdinal(short serverOrdinal);
-
-    boolean isVersionForStreamAtLeast(DataOutput stream, short version);
-
-    boolean isVersionForStreamAtLeast(DataInput stream, short version);
-
-    String getHostName(InetAddress ip_addr);
-
-    RuntimeException getAuthenticationFailedException(String failReason);
-
-    SockCreator getSockCreator();
-
-
-    RuntimeException getSystemConnectException(String localizedString);
-
-    Object getForcedDisconnectException(String localizedString);
-
-    RuntimeException getDisconnectException(String localizedString);
-
-    RuntimeException getGemFireConfigException(String string);
-
-    void setDefaultGemFireAttributes(IpAddress local_addr);
-
-    void setGemFireAttributes(IpAddress addr, Object attr);
-
-    InetAddress getLocalHost() throws UnknownHostException;
-
-    void checkDisableDNS();
-
-    String getVmKindString(int vmKind);
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b2ea77d/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/spi/GFPeerAdapter.java
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/spi/GFPeerAdapter.java b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/spi/GFPeerAdapter.java
deleted file mode 100755
index d82cee7..0000000
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/spi/GFPeerAdapter.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package com.gemstone.org.jgroups.spi;
-
-import java.net.DatagramSocket;
-import java.net.SocketAddress;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Timer;
-
-import com.gemstone.org.jgroups.Address;
-import com.gemstone.org.jgroups.stack.IpAddress;
-import com.gemstone.org.jgroups.util.GFLogWriter;
-import com.gemstone.org.jgroups.util.StringId;
-
-/**
- * The GFAdapter interface provides API access to certain GemFire functions
- * such as statistics recording.
- * 
- * @author bschuchardt
- *
- */
-
-public interface GFPeerAdapter {
-  
-  //////////////////////// Configuration access and notifications
-  
-  DatagramSocket getMembershipSocketForUDP();
-
-  boolean getDisableAutoReconnect();
-
-  boolean isReconnectingDS();
-
-  Timer getConnectionTimeoutTimer();
-
-  void setCacheTimeOffset(Address src, long timeOffs, boolean b);
-
-  boolean getDisableTcp();
-
-  boolean isShunnedMemberNoSync(IpAddress mbr);
-
-  int getAckWaitThreshold();
-
-  int getAckSevereAlertThreshold();
-
-  int getSerialQueueThrottleTime(Address src);
-
-  void pongReceived(SocketAddress socketAddress);
-
-  void quorumLost(Set failures, List remaining);
-
-  boolean isShuttingDown(IpAddress addr);
-
-  int getMcastPort();
-
-  void enableNetworkPartitionDetection();
-
-  long getShunnedMemberTimeout();
-
-  long getMemberTimeout();
-
-  void logStartup(StringId str, Object...args);
-
-  
-
-  //////////////////////// Statistics recording
-
-  void incUcastReadBytes(int len);
-
-  void incjChannelUpTime(long l);
-
-  void incjgChannelDownTime(long l);
-
-  void setJgUNICASTreceivedMessagesSize(long rm);
-
-  void incJgUNICASTdataReceived(long l);
-
-  void setJgUNICASTsentHighPriorityMessagesSize(long hm);
-
-  void setJgUNICASTsentMessagesSize(long sm);
-
-  void incUcastRetransmits();
-
-  void incJgFragmentsCreated(int num_frags);
-
-  void incJgFragmentationsPerformed();
-
-  void incMcastReadBytes(int len);
-
-  long startMcastWrite();
-
-  void endMcastWrite(long start, int length);
-
-  long startUcastWrite();
-
-  void endUcastWrite(long start, int length);
-
-  void incFlowControlResponses();
-
-  void incJgFCsendBlocks(int i);
-
-  long startFlowControlWait();
-
-  void incJgFCautoRequests(int i);
-
-  void endFlowControlWait(long blockStartTime);
-
-  long startFlowControlThrottleWait();
-
-  void endFlowControlThrottleWait(long blockStartTime);
-
-  void incJgFCreplenish(int i);
-
-  void incJgFCresumes(int i);
-
-  void setJgQueuedMessagesSize(int size);
-
-  void incJgFCsentThrottleRequests(int i);
-
-  void incJgFCsentCredits(int i);
-
-  void incFlowControlRequests();
-
-  void incjgUpTime(long l);
-
-  void incBatchSendTime(long gsstart);
-
-  void incBatchCopyTime(long start);
-
-  void incBatchFlushTime(long start);
-
-  void incMcastRetransmitRequests();
-
-  void setJgSTABLEreceivedMessagesSize(long received_msgs_size);
-
-  void setJgSTABLEsentMessagesSize(int size);
-
-  void incJgNAKACKwaits(int i);
-
-  void incMcastRetransmits();
-
-  void incJgSTABLEmessagesSent(int i);
-
-  void incJgSTABLEmessages(int i);
-
-  void incJgSTABLEsuspendTime(long l);
-
-  void incJgSTABILITYmessages(int i);
-
-  void beforeChannelClosing(String string, RuntimeException closeException);
-
-  void beforeSendingPayload(Object gfmsg);
-
-  boolean shutdownHookIsAlive();
-
-  boolean isAdminOnlyMember();
-
-  boolean hasLocator();
-
-  boolean isDisconnecting();
-
-  Properties getCredentials(String authInitMethod, Properties secProps,
-      Address createDistributedMember, boolean b,
-      GFLogWriter logWriter, GFLogWriter securityLogWriter);
-
-  void verifyCredentials(String authenticator, Properties credentials,
-      Properties securityProperties, GFLogWriter logWriter,
-      GFLogWriter securityLogWriter, Address src);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b2ea77d/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckMcastReceiverWindow.java
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckMcastReceiverWindow.java b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckMcastReceiverWindow.java
deleted file mode 100644
index face514..0000000
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckMcastReceiverWindow.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/** Notice of modification as required by the LGPL
- *  This file was modified by Gemstone Systems Inc. on
- *  $Date$
- **/
-// $Id: AckMcastReceiverWindow.java,v 1.6 2004/09/23 16:29:53 belaban Exp $
-
-package com.gemstone.org.jgroups.stack;
-
-
-import com.gemstone.org.jgroups.util.GemFireTracer;
-import com.gemstone.org.jgroups.util.ExternalStrings;
-import com.gemstone.org.jgroups.Address;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-
-
-
-/**
- * Keeps track of messages received from various senders. Acks each message received and checks whether
- * it was already delivered. If yes, the message is discarded, otherwise it is delivered (passed up).
- * The messages contain sequence numbers of old messages to be deleted, those are removed from the
- * message table.
- * 
- * @author Bela Ban June 17 1999
- */
-public class AckMcastReceiverWindow  {
-    final Hashtable msgs=new Hashtable();  // sender -- Vector (of seqnos)
-
-    protected static final GemFireTracer log=GemFireTracer.getLog(AckMcastReceiverWindow.class);
-
-
-
-    /**
-       Records the sender/seqno pair in the message table
-       @param sender The sender of the message
-       @param seqno The sequence number associated with the message
-       @return boolean If false, message is already present. Otherwise true.
-     */
-    public boolean add(Object sender, long seqno) {
-	Vector seqnos=(Vector)msgs.get(sender);
-	Long   val=Long.valueOf(seqno);
-
-	if(seqnos == null) {
-	    seqnos=new Vector();
-	    seqnos.addElement(val);
-	    msgs.put(sender, seqnos);
-	    return true;
-	}
-
-	if(seqnos.contains(val))
-	    return false;
-
-	seqnos.addElement(val);
-	return true;	
-    }
-
-
-
-
-    public void remove(Object sender, Vector seqnos) {
-	Vector v=(Vector)msgs.get(sender);
-	Long   seqno;
-
-	if(v != null && seqnos != null) {
-	    for(int i=0; i < seqnos.size(); i++) {
-		seqno=(Long)seqnos.elementAt(i);
-		v.removeElement(seqno);
-	    }
-	}
-    }
-
-
-
-    public long size() {
-	long ret=0;
-
-	for(Enumeration e=msgs.elements(); e.hasMoreElements();) {
-	    ret+=((Vector)e.nextElement()).size();
-	}
-
-	return ret;
-    }
-
-
-    public void reset() {
-	removeAll();
-    }
-    
-    public void removeAll() {msgs.clear();}
-
-
-    public void suspect(Object sender) {
-
-	    if(log.isInfoEnabled()) log.info(ExternalStrings.AckMcastReceiverWindow_SUSPECT_IS__0, sender);
-	msgs.remove(sender);
-    }
-
-
-
-    @Override // GemStoneAddition
-    public String toString() {
-	StringBuffer ret=new StringBuffer();
-	Object       sender;
-	
-	for(Enumeration e=msgs.keys(); e.hasMoreElements();) {
-	    sender=e.nextElement();
-	    ret.append(sender + " --> " + msgs.get(sender) + '\n');
-	}
-	return ret.toString();
-    }
-
-
-
-
-
-
-//    public static void main(String[] args) {
-//	AckMcastReceiverWindow win=new AckMcastReceiverWindow();
-//	Address sender1=new IpAddress("janet", 1111);
-//	Address sender2=new IpAddress("janet", 4444);
-//	Address sender3=new IpAddress("janet", 6767);
-//	Address sender4=new IpAddress("janet", 3333);
-//
-//	win.add(sender1, 1);
-//	win.add(sender1, 2);
-//
-//	win.add(sender3, 2);
-//	win.add(sender2, 2);
-//	win.add(sender4, 2);
-//	win.add(sender1, 3);
-//	win.add(sender1, 2);
-//
-//
-//	System.out.println(win);
-//
-//	win.suspect(sender1);
-//	System.out.println(win);
-//
-//	win.add(sender1, 1);
-//	win.add(sender1, 2);
-//	win.add(sender1, 3);
-//	win.add(sender1, 4);
-//	win.add(sender1, 5);
-//	win.add(sender1, 6);
-//	win.add(sender1, 7);
-//	win.add(sender1, 8);
-//
-//	System.out.println(win);
-//
-//
-//	Vector seqnos=new Vector();
-//
-//	seqnos.addElement(Long.valueOf(4));
-//	seqnos.addElement(Long.valueOf(6));
-//	seqnos.addElement(Long.valueOf(8));
-//
-//	win.remove(sender2, seqnos);
-//	System.out.println(win);
-//
-//	win.remove(sender1, seqnos);
-//	System.out.println(win);
-//
-//
-//    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b2ea77d/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckMcastSenderWindow.java
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckMcastSenderWindow.java b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckMcastSenderWindow.java
deleted file mode 100644
index f73699b..0000000
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckMcastSenderWindow.java
+++ /dev/null
@@ -1,601 +0,0 @@
-/** Notice of modification as required by the LGPL
- *  This file was modified by Gemstone Systems Inc. on
- *  $Date$
- **/
-// $Id: AckMcastSenderWindow.java,v 1.9 2005/07/17 11:34:20 chrislott Exp $
-
-package com.gemstone.org.jgroups.stack;
-
-
-import com.gemstone.org.jgroups.util.GemFireTracer;
-import com.gemstone.org.jgroups.util.ExternalStrings;
-import com.gemstone.org.jgroups.Address;
-import com.gemstone.org.jgroups.Message;
-import com.gemstone.org.jgroups.util.TimeScheduler;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.*;
-
-
-
-
-/**
- * Keeps track of ACKs from receivers for each message. When a new message is
- * sent, it is tagged with a sequence number and the receiver set (set of
- * members to which the message is sent) and added to a hashtable
- * (key = sequence number, val = message + receiver set). Each incoming ACK
- * is noted and when all ACKs for a specific sequence number haven been
- * received, the corresponding entry is removed from the hashtable. A
- * retransmission thread periodically re-sends the message point-to-point to
- * all receivers from which no ACKs have been received yet. A view change or
- * suspect message causes the corresponding non-existing receivers to be
- * removed from the hashtable.
- * <p>
- * This class may need flow control in order to avoid needless
- * retransmissions because of timeouts.
- *
- * @author Bela Ban June 9 1999
- * @author John Georgiadis May 8 2001
- * @version $Revision: 1.9 $
- */
-public class AckMcastSenderWindow  {
-    /**
-     * Called by retransmitter thread whenever a message needs to be re-sent
-     * to a destination. <code>dest</code> has to be set in the
-     * <code>dst</code> field of <code>msg</code>, as the latter was sent
-     * multicast, but now we are sending a unicast message. Message has to be
-     * copied before sending it (as headers will be appended and therefore
-     * the message changed!).
-     */
-    public interface RetransmitCommand {
-	/**
-	 * Retranmit the given msg
-	 *
-	 * @param seqno the sequence number associated with the message
-	 * @param msg the msg to retransmit (it should be a copy!)
-	 * @param dest the msg destination
-	 */
-	void retransmit(long seqno, Message msg, Address dest);
-    }
-
-
-    /**
-     * The retransmit task executed by the scheduler in regular intervals
-     */
-    private static abstract class Task implements TimeScheduler.Task {
-	private final Interval intervals;
-	private boolean  cancelled;
-
-	protected Task(long[] intervals) {
-	    this.intervals = new Interval(intervals);
-	    this.cancelled = false;
-	}
-	public long nextInterval() { return(intervals.next()); }
-	public void cancel() { cancelled = true; }
-	public boolean cancelled() { return(cancelled); }
-    }
-
-
-    /**
-     * The entry associated with a pending msg
-     */
-    private class Entry extends Task  {
-	/** The msg sequence number */
-	public final long seqno;
-	/** The msg to retransmit */
-	public Message msg = null;
-	/** destination addr -> boolean (true = received, false = not) */
-	public final Hashtable senders = new Hashtable();
-	/** How many destinations have received the msg */
-	public int num_received = 0;
-
-	public Entry(long seqno, Message msg, Vector dests, long[] intervals) {
-	    super(intervals);
-	    this.seqno = seqno;
-	    this.msg   = msg;
-	    for (int i = 0; i < dests.size(); i++)
-		senders.put(dests.elementAt(i), Boolean.FALSE);
-	}
-
-	boolean allReceived() {
-	    return(num_received >= senders.size());
-	}
-
-	/** Retransmit this entry */
-	public void run() { _retransmit(this); }
-
-	    @Override // GemStoneAddition
-	public String toString() {
-	    StringBuffer buff = new StringBuffer();
-	    buff.append("num_received = " + num_received +
-			", received msgs = " + senders);
-	    return(buff.toString());
-	}
-    }
-
-    
-
-    private static final long SEC = 1000;
-    /** Default retransmit intervals (ms) - exponential approx. */
-    private static final long[] RETRANSMIT_TIMEOUTS = {
-	2*SEC,
-	3*SEC,
-	5*SEC,
-	8*SEC};
-    /** Default retransmit thread suspend timeout (ms) */
-    private static final long SUSPEND_TIMEOUT = 2000;
-
-    protected static final GemFireTracer log=GemFireTracer.getLog(AckMcastSenderWindow.class);
-
-
-    // Msg tables related
-    /** Table of pending msgs: seqno -> Entry */
-    private final Hashtable  msgs = new Hashtable();
-
-    /** List of recently suspected members. Used to cease retransmission to suspected members */
-    private final LinkedList suspects=new LinkedList();
-
-    /** Max number in suspects list */
-    private final int max_suspects=20;
-
-    /**
-     * List of acknowledged msgs since the last call to
-     * <code>getStableMessages()</code>
-     */
-    private final Vector stable_msgs = new Vector();
-    /** Whether a call to <code>waitUntilAcksReceived()</code> is still active */
-    private boolean waiting = false;
-
-    // Retransmission thread related
-    /** Whether retransmitter is externally provided or owned by this object */
-    private boolean retransmitter_owned;
-    /** The retransmission scheduler */
-    private TimeScheduler retransmitter = null;
-    /** Retransmission intervals */
-    private long[] retransmit_intervals;
-    /** The callback object for retransmission */
-    private RetransmitCommand cmd = null;
-
-
-    /**
-     * Convert exception stack trace to string
-     */
-    private static String _toString(Throwable ex) {
-	StringWriter sw = new StringWriter();
-	PrintWriter  pw = new PrintWriter(sw);
-	ex.printStackTrace(pw);
-	return(sw.toString());
-    }
-
-
-    /**
-     * @param entry the record associated with the msg to retransmit. It
-     * contains the list of receivers that haven't yet ack reception
-     */
-    protected/*GemStoneAddition*/ void _retransmit(Entry entry) {
-	Address sender;
-	boolean received;
-
-	synchronized(entry) {
-	    for(Enumeration e = entry.senders.keys(); e.hasMoreElements();) {
-		sender   = (Address)e.nextElement();
-		received = ((Boolean)entry.senders.get(sender)).booleanValue();
-		if (!received) {
-		    if(suspects.contains(sender)) {
-
-			    if(log.isWarnEnabled()) log.warn("removing " + sender +
-				       " from retransmit list as it is in the suspect list");
-			remove(sender);
-			continue;
-		    }
-
-			if(log.isInfoEnabled()) log.info("--> retransmitting msg #" +
-				   entry.seqno + " to " + sender);
-		    cmd.retransmit(entry.seqno, entry.msg.copy(), sender);
-		}
-	    }
-	}
-    }
-
-
-    /**
-     * Setup this object's state
-     *
-     * @param cmd the callback object for retranmissions
-     * @param retransmit_intervals the interval between two consecutive
-     * retransmission attempts
-     * @param sched the external scheduler to use to schedule retransmissions
-     * @param sched_owned if true, the scheduler is owned by this object and
-     * can be started/stopped/destroyed. If false, the scheduler is shared
-     * among multiple objects and start()/stop() should not be called from
-     * within this object
-     *
-     * @throws IllegalArgumentException if <code>cmd</code> is null
-     */
-    private void init(RetransmitCommand cmd, long[] retransmit_intervals,
-		      TimeScheduler sched, boolean sched_owned) {
-	if (cmd == null) {
-	    if(log.isErrorEnabled()) log.error(ExternalStrings.AckMcastSenderWindow_COMMAND_IS_NULL_CANNOT_RETRANSMIT_MESSAGES_);
-	    throw new IllegalArgumentException("cmd");
-	}
-
-	retransmitter_owned = sched_owned;
-	retransmitter = sched;
-	this.retransmit_intervals = retransmit_intervals;
-	this.cmd = cmd;
-
-	start();
-    }
-
-
-    /**
-     * Create and <b>start</b> the retransmitter
-     *
-     * @param cmd the callback object for retranmissions
-     * @param retransmit_intervals the interval between two consecutive
-     * retransmission attempts
-     * @param sched the external scheduler to use to schedule retransmissions
-     *
-     * @throws IllegalArgumentException if <code>cmd</code> is null
-     */
-    public AckMcastSenderWindow(RetransmitCommand cmd,
-				long[] retransmit_intervals, TimeScheduler sched) {
-	init(cmd, retransmit_intervals, sched, false);
-    }
-
-
-    /**
-     * Create and <b>start</b> the retransmitter
-     *
-     * @param cmd the callback object for retranmissions
-     * @param sched the external scheduler to use to schedule retransmissions
-     *
-     * @throws IllegalArgumentException if <code>cmd</code> is null
-     */
-    public AckMcastSenderWindow(RetransmitCommand cmd, TimeScheduler sched) {
-	init(cmd, RETRANSMIT_TIMEOUTS, sched, false);
-    }
-
-
-
-    /**
-     * Create and <b>start</b> the retransmitter
-     *
-     * @param cmd the callback object for retranmissions
-     * @param retransmit_intervals the interval between two consecutive
-     * retransmission attempts
-     *
-     * @throws IllegalArgumentException if <code>cmd</code> is null
-     */
-    public AckMcastSenderWindow(RetransmitCommand cmd, long[] retransmit_intervals) {
-	init(cmd, retransmit_intervals, new TimeScheduler(SUSPEND_TIMEOUT), true);
-    }
-
-    /**
-     * Create and <b>start</b> the retransmitter
-     *
-     * @param cmd the callback object for retranmissions
-     *
-     * @throws IllegalArgumentException if <code>cmd</code> is null
-     */
-    public AckMcastSenderWindow(RetransmitCommand cmd) {
-	this(cmd, RETRANSMIT_TIMEOUTS);
-    }
-
-
-    /**
-     * Adds a new message to the hash table.
-     *
-     * @param seqno The sequence number associated with the message
-     * @param msg The message (should be a copy!)
-     * @param receivers The set of addresses to which the message was sent
-     * and from which consequently an ACK is expected
-     */
-    public void add(long seqno, Message msg, Vector receivers) {
-	Entry e;
-
-	if (waiting) return;
-	if (receivers.size() == 0) return;
-
-	synchronized(msgs) {
-	    if (msgs.get(Long.valueOf(seqno)) != null) return;
-	    e = new Entry(seqno, msg, receivers, retransmit_intervals);
-	    msgs.put(Long.valueOf(seqno), e);
-	    retransmitter.add(e);
-	}
-    }
-
-
-    /**
-     * An ACK has been received from <code>sender</code>. Tag the sender in
-     * the hash table as 'received'. If all ACKs have been received, remove
-     * the entry all together.
-     *
-     * @param seqno  The sequence number of the message for which an ACK has
-     * been received.
-     * @param sender The sender which sent the ACK
-     */
-    public void ack(long seqno, Address sender) {
-	Entry   entry;
-	Boolean received;
-
-	synchronized(msgs) {
-	    entry = (Entry)msgs.get(Long.valueOf(seqno));
-	    if (entry == null) return;
-		    
-	    synchronized(entry) {
-		received = (Boolean)entry.senders.get(sender);
-		if (received == null || received.booleanValue()) return;
-			
-		// If not yet received
-		entry.senders.put(sender, Boolean.TRUE);
-		entry.num_received++;
-		if (!entry.allReceived()) return;
-	    }
-		    
-	    synchronized(stable_msgs) {
-		entry.cancel();
-		msgs.remove(Long.valueOf(seqno));
-		stable_msgs.add(Long.valueOf(seqno));
-	    }
-	    // wake up waitUntilAllAcksReceived() method
-	    msgs.notifyAll();
-	}
-    }
-    
-
-    /**
-     * Remove <code>obj</code> from all receiver sets and wake up
-     * retransmission thread.
-     *
-     * @param obj the sender to remove
-     */
-    public void remove(Address obj) {
-	Long  key;
-	Entry entry;
-
-	synchronized(msgs) {
-	    for (Enumeration e = msgs.keys(); e.hasMoreElements();) {
-		key   = (Long)e.nextElement();
-		entry = (Entry)msgs.get(key);
-		synchronized(entry) {
-		    //if (((Boolean)entry.senders.remove(obj)).booleanValue()) entry.num_received--;
-		    //if (!entry.allReceived()) continue;
-		    Boolean received = (Boolean)entry.senders.remove(obj);
-		    if(received == null) continue; // suspected member not in entry.senders ?
-		    if (received.booleanValue()) entry.num_received--;
-		    if (!entry.allReceived()) continue;
-		}
-		synchronized(stable_msgs) {
-		    entry.cancel();
-		    msgs.remove(key);
-		    stable_msgs.add(key);
-		}
-		// wake up waitUntilAllAcksReceived() method
-		msgs.notifyAll();
-	    }
-	}
-    }
-
-
-    /**
-     * Process with address <code>suspected</code> is suspected: remove it
-     * from all receiver sets. This means that no ACKs are expected from this
-     * process anymore.
-     *
-     * @param suspected The suspected process
-     */
-    public void suspect(Address suspected) {
-
-	    if(log.isInfoEnabled()) log.info(ExternalStrings.AckMcastSenderWindow_SUSPECT_IS__0, suspected);
-	remove(suspected);
-	suspects.add(suspected);
-	if(suspects.size() >= max_suspects)
-	    suspects.removeFirst();
-    }
-
-
-    /**
-     * @return a copy of stable messages, or null (if non available). Removes
-     * all stable messages afterwards
-     */
-    public Vector getStableMessages() {
-	Vector retval;
-
-	synchronized(stable_msgs) {
-	    retval = (stable_msgs.size() > 0)? (Vector)stable_msgs.clone():null;
-	    if (stable_msgs.size() > 0) stable_msgs.clear();
-	}
-		
-	return(retval);
-    }
-
-
-    public void clearStableMessages() {
-	synchronized(stable_msgs) {
-	    stable_msgs.clear();
-	}
-    }
-
-
-    /**
-     * @return the number of currently pending msgs
-     */
-    public long size() {
-	synchronized(msgs) {
-	    return(msgs.size());
-	}
-    }
-
-
-    /** Returns the number of members for a given entry for which acks have to be received */
-    public long getNumberOfResponsesExpected(long seqno) {
-	Entry entry=(Entry)msgs.get(Long.valueOf(seqno));
-	if(entry != null)
-	    return entry.senders.size();
-	else
-	    return -1;
-    }
-
-    /** Returns the number of members for a given entry for which acks have been received */
-    public long getNumberOfResponsesReceived(long seqno) {
-	Entry entry=(Entry)msgs.get(Long.valueOf(seqno));
-	if(entry != null)
-	    return entry.num_received;
-	else
-	    return -1;
-    }
-
-    /** Prints all members plus whether an ack has been received from those members for a given seqno */
-    public String printDetails(long seqno) {
-	Entry entry=(Entry)msgs.get(Long.valueOf(seqno));
-	if(entry != null)
-	    return entry.toString();
-	else
-	    return null;
-    }
-
-
-    /**
-     * Waits until all outstanding messages have been ACKed by all receivers.
-     * Takes into account suspicions and view changes. Returns when there are
-     * no entries left in the hashtable. <b>While waiting, no entries can be
-     * added to the hashtable (they will be discarded).</b>
-     *
-     * @param timeout Miliseconds to wait. 0 means wait indefinitely.
-     */
-    public void waitUntilAllAcksReceived(long timeout) {
-	long    time_to_wait, start_time, current_time;
-	Address suspect;
-
-	// remove all suspected members from retransmission
-	for(Iterator it=suspects.iterator(); it.hasNext();) {
-	    suspect=(Address)it.next();
-	    remove(suspect);
-	}
-	
-	time_to_wait = timeout;
-	waiting     = true;
-	if (timeout <= 0) {
-	    synchronized(msgs) {
-		while(msgs.size() > 0)
-		    try { msgs.wait(); } catch(InterruptedException ex) {
-		      Thread.currentThread().interrupt(); // GemStoneAddition
-                      return; // GemStoneAddition
-                    }
-	    }
-	} else {
-	    start_time = System.currentTimeMillis();
-	    synchronized(msgs) {
-		while(msgs.size() > 0) {
-		    current_time = System.currentTimeMillis();
-		    time_to_wait = timeout - (current_time - start_time);
-		    if (time_to_wait <= 0) break;
-		    
-		    try {
-			msgs.wait(time_to_wait);
-		    } catch(InterruptedException ex) {
-			if(log.isWarnEnabled()) log.warn(ex.toString());
-                        Thread.currentThread().interrupt(); // GemStoneAddition
-                        return; // GemStoneAddition
-		    }
-		}
-	    }
-	}	
-	waiting = false;
-    }
-
-
-
-
-    /**
-     * Start the retransmitter. This has no effect, if the retransmitter
-     * was externally provided
-     */
-    public void start() {
-	if (retransmitter_owned)
-	    retransmitter.start();
-    }
-
-
-    /**
-     * Stop the rentransmition and clear all pending msgs.
-     * <p>
-     * If this retransmitter has been provided an externally managed
-     * scheduler, then just clear all msgs and the associated tasks, else
-     * stop the scheduler. In this case the method blocks until the
-     * scheduler's thread is dead. Only the owner of the scheduler should
-     * stop it.
-     */
-    public void stop() {
-	Entry entry;
-
-	// i. If retransmitter is owned, stop it else cancel all tasks
-	// ii. Clear all pending msgs and notify anyone waiting
-	synchronized(msgs) {
-	    if (retransmitter_owned) {
-		try {
-		    retransmitter.stop();
-		} catch(InterruptedException ex) {
-                  // GemStoneAddition (explanation)
-                  // We're trying to stop.  No loops involved.
-                  // Don't bother setting interrupt bit, keep going.
-                  
-		    if(log.isErrorEnabled()) log.error(_toString(ex));
-		}
-	    } else {
-		for (Enumeration e = msgs.elements(); e.hasMoreElements();) {
-		    entry = (Entry)e.nextElement();
-		    entry.cancel();
-		}
-	    }
-	    msgs.clear();
-	    // wake up waitUntilAllAcksReceived() method
-	    msgs.notifyAll();
-	}
-    }
-
-
-    /**
-     * Remove all pending msgs from the hashtable. Cancel all associated
-     * tasks in the retransmission scheduler
-     */
-    public void reset() {
-	Entry entry;
-
-	if (waiting) return;
-
-	synchronized(msgs) {
-	    for (Enumeration e = msgs.elements(); e.hasMoreElements();) {
-		entry = (Entry)e.nextElement();
-		entry.cancel();
-	    }
-	    msgs.clear();
-	    msgs.notifyAll();
-	}
-    }
-
-
-    @Override // GemStoneAddition
-    public String toString() {
-	StringBuffer ret;
-	Entry        entry;
-	Long         key;
-
-	ret = new StringBuffer();
-	synchronized(msgs) {
-	    ret.append("msgs: (" + msgs.size() + ')');
-	    for (Enumeration e = msgs.keys(); e.hasMoreElements();) {
-		key   = (Long)e.nextElement();
-		entry = (Entry)msgs.get(key);
-		ret.append("key = " + key + ", value = " + entry + '\n');
-	    }
-	    synchronized(stable_msgs) {
-		ret.append("\nstable_msgs: " + stable_msgs);
-	    }
-	}
-		
-	return(ret.toString());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b2ea77d/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckReceiverWindow.java
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckReceiverWindow.java b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckReceiverWindow.java
deleted file mode 100644
index b25b41d..0000000
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckReceiverWindow.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/** Notice of modification as required by the LGPL
- *  This file was modified by Gemstone Systems Inc. on
- *  $Date$
- **/
-// $Id: AckReceiverWindow.java,v 1.20 2005/08/26 11:32:44 belaban Exp $
-
-package com.gemstone.org.jgroups.stack;
-
-
-import com.gemstone.org.jgroups.util.GemFireTracer;
-
-
-import com.gemstone.org.jgroups.Message;
-
-import java.util.HashMap;
-import java.util.TreeSet;
-
-
-/**
- * Counterpart of AckSenderWindow. Simple FIFO buffer.
- * Every message received is ACK'ed (even duplicates) and added to a hashmap
- * keyed by seqno. The next seqno to be received is stored in <code>next_to_remove</code>. When a message with
- * a seqno less than next_to_remove is received, it will be discarded. The <code>remove()</code> method removes
- * and returns a message whose seqno is equal to next_to_remove, or null if not found.<br>
- * Change May 28 2002 (bela): replaced TreeSet with HashMap. Keys do not need to be sorted, and adding a key to
- * a sorted set incurs overhead.
- *
- * @author Bela Ban
- */
-public class AckReceiverWindow {
-    long              next_to_remove=0;
-    final HashMap     msgs=new HashMap();  // keys: seqnos (Long), values: Messages
-    static final GemFireTracer log=GemFireTracer.getLog(AckReceiverWindow.class);
-    
-    /**
-     * GemStoneAddition - for DirAck we must track the highest seqno for which
-     * a releasing Ack has been sent
-     */
-    long highest_released_seqno;
-    
-    /**
-     * GemStoneAddition - track whether a releasing Ack has been sent for
-     * a message retrieved from this window
-     * 
-     * @param seqno the released sequence number
-     */
-    public synchronized void releasedMessage(long seqno) {
-      if (seqno > highest_released_seqno) {
-        highest_released_seqno = seqno;
-      }
-    }
-    
-    public long getHighestReleasedSeqno() {
-      return highest_released_seqno;
-    }
-
-
-    public AckReceiverWindow(long initial_seqno) {
-        this.next_to_remove=initial_seqno;
-    }
-
-
-    /** Adds a new message. Message cannot be null */
-    public boolean add2(long seqno, Message msg) { // GemStoneAddition - this is add() that returns false if msg not retained
-        if(msg == null)
-            throw new IllegalArgumentException("msg must be non-null");
-        synchronized(msgs) {
-            if(seqno < next_to_remove) {
-                if(log.isTraceEnabled())
-                    // GemStoneAddition - better logging
-                    log.trace("discarded msg with seqno=" + seqno + " (next msg to dispatch is " + next_to_remove + ')');
-                return false;
-            }
-            Long seq=Long.valueOf(seqno);
-            if(!msgs.containsKey(seq)) { // todo: replace with atomic action once we have util.concurrent (JDK 5)
-                msgs.put(seq, msg);
-                // GemStoneAddition - better logging
-                if (log.isTraceEnabled()) {
-                  log.trace("seqno " + seqno + " added to receiver window (next" +
-                                " msg to dispatch is " + next_to_remove + ')');
-                }
-            }
-            else {
-                if(log.isTraceEnabled())
-                  // GemStoneAddition - better logging
-                    log.trace("seqno " + seqno + " already received and awaiting" +
-                    " dispatch (next msg to dispatch is " + next_to_remove + ')');
-            }
-            return true;
-        }
-    }
-    
-    /** GemStoneAddition - returns the next seqno to dispatch */
-    public long nextToRemove() {
-      return this.next_to_remove;
-    }
-
-
-    /** Adds a new message. Message cannot be null
-     * @return true if the message was added, false if it was already there (GemStoneAddition)
-     */
-    public boolean add(long seqno, Message msg) { // GemStoneAddition - return false if msg not retained
-        if(msg == null)
-            throw new IllegalArgumentException("msg must be non-null");
-        synchronized(msgs) {
-            if(seqno < next_to_remove) {
-                if(log.isTraceEnabled())
-                    log.trace("discarded msg with seqno=" + seqno + " (next msg to receive is " + next_to_remove + ')');
-                return false;
-            }
-            Long seq=Long.valueOf(seqno);
-            if(!msgs.containsKey(seq)) { // todo: replace with atomic action once we have util.concurrent (JDK 5)
-                msgs.put(seq, msg);
-                return true;
-            }
-            else {
-                if(log.isTraceEnabled())
-                    log.trace("seqno " + seqno + " already received - dropping it");
-                return false;
-            }
-        }
-    }
-
-
-    /**
-     * Removes a message whose seqno is equal to <code>next_to_remove</code>, increments the latter.
-     * Returns message that was removed, or null, if no message can be removed. Messages are thus
-     * removed in order.
-     */
-    public Message remove() {
-        Message retval;
-
-        synchronized(msgs) {
-            Long key=Long.valueOf(next_to_remove);
-            retval=(Message)msgs.remove(key);
-            if(retval != null) {
-                if(log.isTraceEnabled())
-                    log.trace("removed seqno=" + next_to_remove + ": " + retval);
-                next_to_remove++;
-            }
-        }
-        return retval;
-    }
-    
-    /** GemStoneAddition - see if the given message is the next to be processed */
-    public boolean isNextToRemove(long seqno) {
-      synchronized(msgs) {
-        return seqno == next_to_remove;
-      }
-    }
-
-
-    public void reset() {
-        synchronized(msgs) {
-            msgs.clear();
-        }
-    }
-
-    public int size() {
-        return msgs.size();
-    }
-
-    @Override // GemStoneAddition
-    public String toString() {
-        StringBuffer sb=new StringBuffer();
-        sb.append("(msgs pending=").append(msgs.size()).append(" next=").append(next_to_remove).append(")");
-        TreeSet s=new TreeSet(msgs.keySet());
-        if(s.size() > 0) {
-            sb.append(" [").append(s.first()).append(" - ").append(s.last()).append("]");
-            sb.append(": ").append(s);
-        }
-        return sb.toString();
-    }
-
-
-    public String printDetails() {
-        StringBuffer sb=new StringBuffer();
-        sb.append(msgs.size()).append(" msgs (").append("next=").append(next_to_remove).append(")").
-                append(", msgs=" ).append(new TreeSet(msgs.keySet()));
-        return sb.toString();
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b2ea77d/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckSenderWindow.java
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckSenderWindow.java b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckSenderWindow.java
deleted file mode 100644
index fda6aeb..0000000
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/AckSenderWindow.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/** Notice of modification as required by the LGPL
- *  This file was modified by Gemstone Systems Inc. on
- *  $Date$
- **/
-// $Id: AckSenderWindow.java,v 1.17 2005/08/26 08:56:22 belaban Exp $
-
-package com.gemstone.org.jgroups.stack;
-
-
-import java.util.concurrent.ConcurrentHashMap;
-import com.gemstone.org.jgroups.protocols.TP;
-import com.gemstone.org.jgroups.util.GemFireTracer;
-import com.gemstone.org.jgroups.Address;
-import com.gemstone.org.jgroups.Message;
-import com.gemstone.org.jgroups.util.ExternalStrings;
-import com.gemstone.org.jgroups.util.TimeScheduler;
-import com.gemstone.org.jgroups.util.Util;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.TreeSet;
-
-
-/**
- * ACK-based sliding window for a sender. Messages are added to the window keyed by seqno
- * When an ACK is received, the corresponding message is removed. The Retransmitter
- * continously iterates over the entries in the hashmap, retransmitting messages based on their
- * creation time and an (increasing) timeout. When there are no more messages in the retransmission
- * table left, the thread terminates. It will be re-activated when a new entry is added to the
- * retransmission table.
- * @author Bela Ban
- */
-public class AckSenderWindow implements Retransmitter.RetransmitCommand {
-    RetransmitCommand   retransmit_command = null;   // called to request XMIT of msg
-    final Map     msgs=new ConcurrentHashMap();        // keys: seqnos (Long), values: Messages
-    long[]              interval = new long[]{400,800,1200,1600};
-    final Retransmitter retransmitter;
-    static    final GemFireTracer log=GemFireTracer.getLog(AckSenderWindow.class);
-    Address dest = null; // GemStoneAddition - added for debugging so we know dest for xmit tasks
-    
-    public interface RetransmitCommand {
-        void retransmit(long seqno, Message msg);
-        // GemStoneAddition - retransmission burst containment (bug #40467)
-        long getMaxRetransmissionBurst();
-    }
-
-
-    /**
-     * Creates a new instance. Thre retransmission thread has to be started separately with
-     * <code>start()</code>.
-     * @param com If not null, its method <code>retransmit()</code> will be called when a message
-     *            needs to be retransmitted (called by the Retransmitter).
-     */
-    public AckSenderWindow(RetransmitCommand com) {
-        retransmit_command = com;
-        retransmitter = new Retransmitter(null, this);
-        retransmitter.setRetransmitTimeouts(interval);
-    }
-
-
-    public AckSenderWindow(RetransmitCommand com, long[] interval) {
-        retransmit_command = com;
-        this.interval = interval;
-        retransmitter = new Retransmitter(null, this);
-        retransmitter.setRetransmitTimeouts(interval);
-    }
-
-
-
-    public AckSenderWindow(RetransmitCommand com, long[] interval, TimeScheduler sched) {
-        retransmit_command = com;
-        this.interval = interval;
-        retransmitter = new Retransmitter(null, this, sched);
-        retransmitter.setRetransmitTimeouts(interval);
-    }
-
-
-
-    public void reset() {
-      synchronized (msgs) { // GemStoneAddition
-        msgs.clear();
-      }
-
-        // moved out of sync scope: Retransmitter.reset()/add()/remove() are sync'ed anyway
-        // Bela Jan 15 2003
-        retransmitter.reset();
-    }
-
-
-    /**
-     * Adds a new message to the retransmission table. If the message won't have received an ack within
-     * a certain time frame, the retransmission thread will retransmit the message to the receiver. If
-     * a sliding window protocol is used, we only add up to <code>window_size</code> messages. If the table is
-     * full, we add all new messages to a queue. Those will only be added once the table drains below a certain
-     * threshold (<code>min_threshold</code>)
-     */
-    public void add(long seqno, Message msg) {
-        Long tmp=Long.valueOf(seqno);
-        synchronized(msgs) {  // the contains() and put() should be atomic
-          if (this.dest == null) {
-            this.dest = msg.getDest();
-          }
-          if(!msgs.containsKey(tmp))
-            msgs.put(tmp, msg);
-          retransmitter.add(seqno,seqno);
-        }
-    }
-
-
-    /**
-     * Removes the message from <code>msgs</code>, removing them also from retransmission. If
-     * sliding window protocol is used, and was queueing, check whether we can resume adding elements.
-     * Add all elements. If this goes above window_size, stop adding and back to queueing. Else
-     * set queueing to false.
-     * @return the size of the message if the message was still in the window and required an ack, or -1 if not found
-     */
-    public long ack(long seqno) {
-      final Message msg;
-        synchronized(msgs) {
-          msg = (Message)msgs.remove(Long.valueOf(seqno));
-          if (msg == null) {
-            return -1;
-          }
-          retransmitter.remove(seqno);
-        }
-        return msg.size();
-    }
-
-    public int size() {
-      synchronized (msgs) { // GemStoneAddition
-        return msgs.size();
-      }
-    }
-
-    @Override // GemStoneAddition
-    public String toString() {
-        StringBuffer sb=new StringBuffer();
-        //sb.append(msgs.size()).append(" msgs (").append(retransmitter.size()).append(" to retransmit): ");
-        sb.append("retransmitter: ");
-//        retransmitter.toString(sb);
-        TreeSet keys=new TreeSet(msgs.keySet());
-        if(keys.size() > 0)
-            sb.append('{').append(keys.first()).append(" - ").append(keys.last()).append('}');
-        else
-            sb.append("{}");
-        return sb.toString();
-    }
-
-
-    public String printDetails() {
-        StringBuffer sb=new StringBuffer();
-        sb.append(msgs.size()).append(" msgs (").append(retransmitter.size()).append(" to retransmit): ").
-                append(new TreeSet(msgs.keySet()));
-        return sb.toString();
-    }
-
-    /* -------------------------------- Retransmitter.RetransmitCommand interface ------------------- */
-    public Address getDest() {
-      return this.dest;
-    }
-    
-    public void retransmit(long first_seqno, long last_seqno, Address sender) {
-        Message msg;
-        Address dest = null;
-        long burstLimit = retransmit_command.getMaxRetransmissionBurst(); // GemStoneAddition - max burst size
-        long burstSize = 0;
-
-        if (retransmit_command != null) {
-            for (long i = first_seqno; i <= last_seqno; i++) {
-              // GemStoneAddition: fetch msg under synchronization
-              synchronized (msgs) {
-                msg = (Message) msgs.get(Long.valueOf(i));                
-              }
-                if(msg != null) { // find the message to retransmit
-                    retransmit_command.retransmit(i, msg);
-                    dest = msg.getDest();
-                    if (burstLimit > 0) {
-                      burstSize += msg.size();
-                      if (burstSize >= burstLimit) {
-                        break;
-                      }
-                    }
-                }
-            }
-            if (log.isTraceEnabled() || TP.VERBOSE) {
-              StringBuffer b = new StringBuffer("retransmitted message");
-              if (last_seqno == first_seqno) {
-                b.append(' ').append(first_seqno);
-              }
-              else {
-                b.append("s ").append(first_seqno).
-                          append(" - ").append(last_seqno);
-              }
-              if (dest != null) {
-                b.append(" to ").append(dest);
-              }
-              log.getLogWriter().info(ExternalStrings.DEBUG, b);
-            }
-        }
-    }
-    /* ----------------------------- End of Retransmitter.RetransmitCommand interface ---------------- */
-
-
-
-
-
-    /* ---------------------------------- Private methods --------------------------------------- */
-
-    /* ------------------------------ End of Private methods ------------------------------------ */
-
-
-
-
-    /** Struct used to store message alongside with its seqno in the message queue */
-    static/*GemStoneAddition*/ class Entry {
-        final long seqno;
-        final Message msg;
-
-        Entry(long seqno, Message msg) {
-            this.seqno = seqno;
-            this.msg = msg;
-        }
-    }
-
-
-    static class Dummy implements RetransmitCommand {
-        static/*GemStoneAddition*/ final long last_xmit_req = 0;
-//         long curr_time; GemStoneAddition (omitted)
-
-
-        public void retransmit(long seqno, Message msg) {
-
-                if(log.isDebugEnabled()) log.debug("seqno=" + seqno);
-
-//            curr_time = System.currentTimeMillis(); GemStoneAddition
-        }
-        public long getMaxRetransmissionBurst() {
-          return 0;
-        }
-    }
-
-
-//    public static void main(String[] args) {
-//        long[] xmit_timeouts = {1000, 2000, 3000, 4000};
-//        AckSenderWindow win = new AckSenderWindow(new Dummy(), xmit_timeouts);
-//
-//
-//
-//        final int NUM = 1000;
-//
-//        for (int i = 1; i < NUM; i++)
-//            win.add(i, new Message());
-//
-//
-//        try { // GemStoneAddition
-//        System.out.println(win);
-//        Util.sleep(5000);
-//
-//        for (int i = 1; i < NUM; i++) {
-//            if (i % 2 == 0) // ack the even seqnos
-//                win.ack(i);
-//        }
-//
-//        System.out.println(win);
-//        Util.sleep(4000);
-//        }
-//        catch (InterruptedException e) {
-//          return; // this is a main; just exit.
-//        }
-//
-//        for (int i = 1; i < NUM; i++) {
-//            if (i % 2 != 0) // ack the odd seqnos
-//                win.ack(i);
-//        }
-//        System.out.println(win);
-//
-//        win.add(3, new Message());
-//        win.add(5, new Message());
-//        win.add(4, new Message());
-//        win.add(8, new Message());
-//        win.add(9, new Message());
-//        win.add(6, new Message());
-//        win.add(7, new Message());
-//        win.add(3, new Message());
-//        System.out.println(win);
-//
-//
-//        try {
-//            Thread.sleep(5000);
-//            win.ack(5);
-//            System.out.println("ack(5)");
-//            win.ack(4);
-//            System.out.println("ack(4)");
-//            win.ack(6);
-//            System.out.println("ack(6)");
-//            win.ack(7);
-//            System.out.println("ack(7)");
-//            win.ack(8);
-//            System.out.println("ack(8)");
-//            win.ack(6);
-//            System.out.println("ack(6)");
-//            win.ack(9);
-//            System.out.println("ack(9)");
-//            System.out.println(win);
-//
-//            Thread.sleep(5000);
-//            win.ack(3);
-//            System.out.println("ack(3)");
-//            System.out.println(win);
-//
-//            Thread.sleep(3000);
-//            win.add(10, new Message());
-//            win.add(11, new Message());
-//            System.out.println(win);
-//            Thread.sleep(3000);
-//            win.ack(10);
-//            System.out.println("ack(10)");
-//            win.ack(11);
-//            System.out.println("ack(11)");
-//            System.out.println(win);
-//
-//            win.add(12, new Message());
-//            win.add(13, new Message());
-//            win.add(14, new Message());
-//            win.add(15, new Message());
-//            win.add(16, new Message());
-//            System.out.println(win);
-//
-//            Util.sleep(1000);
-//            win.ack(12);
-//            System.out.println("ack(12)");
-//            win.ack(13);
-//            System.out.println("ack(13)");
-//
-//            win.ack(15);
-//            System.out.println("ack(15)");
-//            System.out.println(win);
-//
-//            Util.sleep(5000);
-//            win.ack(16);
-//            System.out.println("ack(16)");
-//            System.out.println(win);
-//
-//            Util.sleep(1000);
-//
-//            win.ack(14);
-//            System.out.println("ack(14)");
-//            System.out.println(win);
-//        } catch (Exception e) {
-//            log.error(e);
-//        }
-//    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b2ea77d/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/BoundedLinkedHashMap.java
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/BoundedLinkedHashMap.java b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/BoundedLinkedHashMap.java
deleted file mode 100755
index 8b2573a..0000000
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/BoundedLinkedHashMap.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*=========================================================================
- * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * one or more patents listed at http://www.pivotal.io/patents.
- *=========================================================================
- */
-package com.gemstone.org.jgroups.stack;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * Class <code>BoundedLinkedHashMap</code> is a bounded
- * <code>LinkedHashMap</code>. The bound is the maximum
- * number of entries the <code>BoundedLinkedHashMap</code>
- * can contain.
- *
- * @author Barry Oglesby
- *
- * @since 4.2
- * @deprecated as of 5.7 create your own class that extends {@link LinkedHashMap}
- * and implement {@link LinkedHashMap#removeEldestEntry}
- * to enforce a maximum number of entries.
- */
-@Deprecated
-public class BoundedLinkedHashMap extends LinkedHashMap
-{
-  private static final long serialVersionUID = -3419897166186852692L;
-
-  /**
-   * The maximum number of entries allowed in this
-   * <code>BoundedLinkedHashMap</code>
-   */
-  protected int _maximumNumberOfEntries;
-
-  /**
-   * Constructor.
-   *
-   * @param initialCapacity The initial capacity.
-   * @param loadFactor The load factor
-   * @param maximumNumberOfEntries The maximum number of allowed entries
-   */
-  public BoundedLinkedHashMap(int initialCapacity, float loadFactor, int maximumNumberOfEntries) {
-    super(initialCapacity, loadFactor);
-    this._maximumNumberOfEntries = maximumNumberOfEntries;
-  }
-
-  /**
-   * Constructor.
-   *
-   * @param initialCapacity The initial capacity.
-   * @param maximumNumberOfEntries The maximum number of allowed entries
-   */
-  public BoundedLinkedHashMap(int initialCapacity, int maximumNumberOfEntries) {
-    super(initialCapacity);
-    this._maximumNumberOfEntries = maximumNumberOfEntries;
-  }
-
-  /**
-   * Constructor.
-   *
-   * @param maximumNumberOfEntries The maximum number of allowed entries
-   */
-  public BoundedLinkedHashMap(int maximumNumberOfEntries) {
-    super();
-    this._maximumNumberOfEntries = maximumNumberOfEntries;
-  }
-
-  /**
-   * Returns the maximum number of entries.
-   * @return the maximum number of entries
-   */
-  public int getMaximumNumberOfEntries(){
-    return this._maximumNumberOfEntries;
-  }
-
-  @Override
-  protected boolean removeEldestEntry(Map.Entry entry) {
-    return size() > this._maximumNumberOfEntries;
-  }
-}


Mime
View raw message