|
||||||||||
| 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 FamilyClusterInfopublic List getTargets()
getTargets in interface FamilyClusterInfoCollections.unmodifiableList(List)public long getCurrentViewId()
FamilyClusterInfo
getCurrentViewId in interface FamilyClusterInfopublic int getCursor()
FamilyClusterInfolist 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 FamilyClusterInfoFamilyClusterInfo.UNINITIALIZED_CURSOR,
RoundRobinpublic int setCursor(int cursor)
FamilyClusterInfolist of targets. Useful for round-robin load
balancing strategies that wish to coordinate between instances.
setCursor in interface FamilyClusterInfopublic Object getObject()
FamilyClusterInfolist 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 FamilyClusterInfonullFirstAvailableIdenticalAllProxiespublic Object setObject(Object whatever)
FamilyClusterInfolist of targets
that "sticky" load balancing strategies that wish to coordinate between
instances should use.
setObject in interface FamilyClusterInfowhatever - *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 FamilyClusterInfotarget - the target
public List updateClusterInfo(List targets,
long viewId)
FamilyClusterInfo
updateClusterInfo in interface FamilyClusterInfopublic boolean currentMembershipInSyncWithViewId()
FamilyClusterInfotarget 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 FamilyClusterInfopublic void resetView()
FamilyClusterInfo
resetView in interface FamilyClusterInfopublic int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||