com.jalios.jstore.jsync
Class JSyncPreviousReplicaManager

java.lang.Object
  extended by com.jalios.jstore.jsync.JSyncPreviousReplicaManager
All Implemented Interfaces:
JSyncConstants, JaliosConstants

public class JSyncPreviousReplicaManager
extends Object
implements JSyncConstants

The aim of this class is to compute the list of url of replica previously connected to this leader. If the attribute (see explicitReplicaList) is set to a list of url separated by spaces, then the list of previous replica is computed from a split of this String.

Since:
JCMS-5.7.4
Version:
$Revision: 30683 $
Author:
dissert

Field Summary
static String REVISION
           
 
Fields inherited from interface com.jalios.jstore.jsync.JSyncConstants
SC_BAD_ADDRESS, SC_BAD_LEADER, SC_BAD_MESSAGE, SC_INTERNAL_SERVER_ERROR, SC_JOIN_REJECTED, SC_LEADER_CANNOT_JOIN, SC_NO_ACK, SC_NO_SEND, SC_OK, SC_UNKNOWN, SC_UNKNOWN_URID, SC_URID_ALREADY_ADDED, STATUS_LEADER, STATUS_LONE, STATUS_MEMBER, STATUS_SUBLEADER
 
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
 
Method Summary
static void addReplica(ReplicaInfo replica, Date joinDate)
           
 void addReplicaUrl(ReplicaInfo replica, Date joinDate)
           
static JSyncPreviousReplicaManager getInstance(boolean suggestJoin, String explicitReplicaList, File previouslyConnectedReplicaFile, JSyncReplica replica)
          Returns the manager
 Set<String> getPreviousReplica()
          Gives the list of url of replica previously connected (as far as we remember it) and not connected now.
 void setExplicitReplicaList(String explicitReplicaList)
           
 void setPreviouslyConnectedReplicaFile(File previouslyConnectedReplicaFile)
           
 void setSuggestJoin(boolean suggestJoin)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Method Detail

getInstance

public static JSyncPreviousReplicaManager getInstance(boolean suggestJoin,
                                                      String explicitReplicaList,
                                                      File previouslyConnectedReplicaFile,
                                                      JSyncReplica replica)
Returns the manager

Returns:
the unique instance of the manager

setSuggestJoin

public void setSuggestJoin(boolean suggestJoin)

setExplicitReplicaList

public void setExplicitReplicaList(String explicitReplicaList)

setPreviouslyConnectedReplicaFile

public void setPreviouslyConnectedReplicaFile(File previouslyConnectedReplicaFile)

getPreviousReplica

public Set<String> getPreviousReplica()
Gives the list of url of replica previously connected (as far as we remember it) and not connected now.

Returns:
the set of such url.

addReplica

public static void addReplica(ReplicaInfo replica,
                              Date joinDate)

addReplicaUrl

public void addReplicaUrl(ReplicaInfo replica,
                          Date joinDate)


Copyright © 2001-2010 Jalios SA. All Rights Reserved.