A tree-like structure that is replicated across several members. Updates will be multicast to all group
members reliably and in the same order.
_add
public void _add(String fqn)
_add
public void _add(String fqn,
Serializable element)
_remove
public void _remove(String fqn)
_reset
public void _reset(String fqn,
Serializable element)
similar to set, but does not error if node does not exist, but rather does an add instead
_set
public void _set(String fqn,
Serializable element)
add
public void add(String fqn)
add
public void add(String fqn,
Serializable element)
add
public void add(String fqn,
Serializable element,
int timeout)
block
public void block()
Block sending and receiving of messages until ViewAccepted is called
- block in interface MembershipListener
exists
public boolean exists(String fqn)
get
public Serializable get(String fqn)
getChannel
public Channel getChannel()
Returns the Channel the DistributedTree is connected to
getChildrenNames
public Vector getChildrenNames(String fqn)
Returns all children of a Node as strings
getGroupMembersNumber
public int getGroupMembersNumber()
Returns the number of current members joined to the group
getGroupName
public String getGroupName()
Returns the name of the group that the DistributedTree is connected to
getLocalAddress
public Object getLocalAddress()
print
public String print()
remove
public void remove(String fqn)
remove
public void remove(String fqn,
int timeout)
reset
public void reset(String fqn,
Serializable element)
resets an existing node, useful after a merge when you want to tell other
members of your state, but do not wish to remove and then add as two separate calls
reset
public void reset(String fqn,
Serializable element,
int timeout)
resets an existing node, useful after a merge when you want to tell other
members of your state, but do not wish to remove and then add as two separate calls
set
public void set(String fqn,
Serializable element)
set
public void set(String fqn,
Serializable element,
int timeout)
setDeadlockDetection
public void setDeadlockDetection(boolean flag)
setState
public void setState(byte[] data)
Sets the group state; e.g., when joining.
- setState in interface MessageListener
start
public void start()
throws Exception
start
public void start(long timeout)
throws Exception
viewAccepted
public void viewAccepted(View new_view)
Called when a change in membership has occurred.
No long running actions should be done in this callback.
If some long running action needs to be performed, it should be done in a separate thread.
- viewAccepted in interface MembershipListener