|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ha.framework.interfaces.FamilyClusterInfoImpl
public class FamilyClusterInfoImpl
Default implementation of FamilyClusterInfo
FamilyClusterInfo
,
ClusteringTargetsRepository
Field Summary |
---|
Fields inherited from interface org.jboss.ha.framework.interfaces.FamilyClusterInfo |
---|
UNINITIALIZED_CURSOR |
Constructor Summary | |
---|---|
protected |
FamilyClusterInfoImpl(String familyName,
List targets,
long viewId)
|
Method Summary | |
---|---|
boolean |
currentMembershipInSyncWithViewId()
Gets whether this object believes its current target list matches what the server-side
used to generate the view id . |
boolean |
equals(Object o)
|
long |
getCurrentViewId()
Gets a shorthand identifier for the current cluster topology for the clustered service represented by this object. |
int |
getCursor()
Gets a cursor indicating a position in the current list of targets . |
String |
getFamilyName()
|
Object |
getObject()
Gets an object that may be one of the members of the current list of targets . |
List |
getTargets()
Returns an unmodifiable view of the target list. |
int |
hashCode()
|
List |
removeDeadTarget(Object target)
Remove the given target from the list of targets. |
void |
resetView()
Force a reload of the view at the next invocation. |
int |
setCursor(int cursor)
Sets a cursor indicating a position in the current list of targets . |
Object |
setObject(Object whatever)
Sets the member of the current list of targets
that "sticky" load balancing strategies that wish to coordinate between
instances should use. |
String |
toString()
|
List |
updateClusterInfo(List targets,
long viewId)
Updates the targets and the view id. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected FamilyClusterInfoImpl(String familyName, List targets, long viewId)
Method Detail |
---|
public String getFamilyName()
getFamilyName
in interface FamilyClusterInfo
public List getTargets()
getTargets
in interface FamilyClusterInfo
Collections.unmodifiableList(List)
public long getCurrentViewId()
FamilyClusterInfo
getCurrentViewId
in interface FamilyClusterInfo
public int getCursor()
FamilyClusterInfo
list of targets
. Useful for round-robin load
balancing strategies that wish to coordinate between instances.
It is not guaranteed that the returned value will be less than the size of the target list; callers need to verify that themselves.
getCursor
in interface FamilyClusterInfo
FamilyClusterInfo.UNINITIALIZED_CURSOR
,
RoundRobin
public int setCursor(int cursor)
FamilyClusterInfo
list of targets
. Useful for round-robin load
balancing strategies that wish to coordinate between instances.
setCursor
in interface FamilyClusterInfo
public Object getObject()
FamilyClusterInfo
list of targets
. Useful for "sticky" load
balancing strategies that wish to coordinate between instances.
It is not guaranteed that the returned object will be a current member of the target list; callers need to verify that themselves.
getObject
in interface FamilyClusterInfo
null
FirstAvailableIdenticalAllProxies
public Object setObject(Object whatever)
FamilyClusterInfo
list of targets
that "sticky" load balancing strategies that wish to coordinate between
instances should use.
setObject
in interface FamilyClusterInfo
whatever
- *should* be a member of the current list of targets, or
null
. However, this requirement is not
enforced.public List removeDeadTarget(Object target)
FamilyClusterInfo
removeDeadTarget
in interface FamilyClusterInfo
target
- the target
public List updateClusterInfo(List targets, long viewId)
FamilyClusterInfo
updateClusterInfo
in interface FamilyClusterInfo
public boolean currentMembershipInSyncWithViewId()
FamilyClusterInfo
target list
matches what the server-side
used to generate the view id
.
Generally, a call to FamilyClusterInfo.removeDeadTarget(Object)
would cause
this method to return false
until a subsequent call
to FamilyClusterInfo.updateClusterInfo(List, long)
is made.
currentMembershipInSyncWithViewId
in interface FamilyClusterInfo
public void resetView()
FamilyClusterInfo
resetView
in interface FamilyClusterInfo
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |