com.jalios.jstore.jsync
Class JSyncPreviousReplicaManager
java.lang.Object
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
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REVISION
public static final String REVISION
- See Also:
- Constant Field Values
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.