|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FamilyClusterInfo
Maintain information for a given proxy family. Proxies can statically reference
objects implementing this interface: only the content will change as the
cluster topology changes, not the FamilyClusterInfo object itself.
Proxies or LoadBalancing policy implementations can use the cursor and object
attribute to store arbitrary data that is then shared accross all proxies belonging
to the same family.
Initial access to this object is done through the
ClusteringTargetsRepository
singleton.
Revisions:
2002/08/23, Sacha Labourey:
FamilyClusterInfoImpl
,
ClusteringTargetsRepository
Field Summary | |
---|---|
static int |
UNINITIALIZED_CURSOR
Initial value returned by getCursor() . |
Method Summary | |
---|---|
boolean |
currentMembershipInSyncWithViewId()
Gets whether this object believes its current target list matches what the server-side
used to generate the view id . |
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()
Gets the list of targets for this family. |
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. |
List |
updateClusterInfo(List targets,
long viewId)
Updates the targets and the view id. |
Field Detail |
---|
static final int UNINITIALIZED_CURSOR
getCursor()
.
Method Detail |
---|
String getFamilyName()
List getTargets()
long getCurrentViewId()
List removeDeadTarget(Object target)
target
- the target
List updateClusterInfo(List targets, long viewId)
boolean currentMembershipInSyncWithViewId()
target list
matches what the server-side
used to generate the view id
.
Generally, a call to removeDeadTarget(Object)
would cause
this method to return false
until a subsequent call
to updateClusterInfo(List, long)
is made.
void resetView()
int getCursor()
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.
UNINITIALIZED_CURSOR
,
RoundRobin
int setCursor(int cursor)
list of targets
. Useful for round-robin load
balancing strategies that wish to coordinate between instances.
the
- cursorObject getObject()
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.
null
FirstAvailableIdenticalAllProxies
Object setObject(Object whatever)
list of targets
that "sticky" load balancing strategies that wish to coordinate between
instances should use.
whatever
- *should* be a member of the current list of targets, or
null
. However, this requirement is not
enforced.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |