|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjgroup.relacs.gm.TimestampLayer
public class TimestampLayer
The TimestampLayer
creates an agreed timestamp
between all the members in a group.
The timestamp can be retrieved as a counter (not unique between groups) or as a timestamp object (unique between groups).
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface jgroup.relacs.gm.TimestampService |
---|
TimestampService.Timestamp |
Nested classes/interfaces inherited from interface jgroup.core.Layer |
---|
Layer.FinalizeLayer |
Nested classes/interfaces inherited from interface jgroup.core.MembershipListener |
---|
MembershipListener.AllowDuplicateViews |
Method Summary | |
---|---|
void |
addListener(java.lang.Object listener)
Add a listener to this layer. |
void |
complete(java.lang.Object server)
This method is invoked on the layer, once the whole Jgroup group manager construction has been completed. |
java.lang.Object |
getInternalTimestamp()
Gets the internal timestamp of all members of a group. |
static TimestampLayer |
getLayer(GroupManager gm,
MembershipService ms,
InternalGMIService igmi)
|
TimestampService.Timestamp |
getTimestamp(int id)
Returns a Timestamp object, and updates
the timestamp counter. |
long |
getTimestampCounter()
Returns the timestamp counter value, and updates the timestamp counter. |
void |
hasLeft()
Upcall that is invoked by Jgroup to acknowledge the fact that this object has left the group. |
void |
prepareChange()
Upcall that is invoked by the group membership service to notify that the current view is not valid any more, and the group membership service is trying to reach an agreement on a new view. |
void |
viewChange(View view)
Upcall invoked on members implementing the MembershipListener
interface, when a view change occurs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static TimestampLayer getLayer(GroupManager gm, MembershipService ms, InternalGMIService igmi)
public void addListener(java.lang.Object listener)
Layer
addListener
in interface Layer
listener
- An Object
representation of the listener interface.
This will typically be cast to the appropriate listener interface
type after checking the type with the instanceof operator.public void complete(java.lang.Object server) throws JgroupException
Layer.FinalizeLayer
complete()
method is supposed to implemented stuff that depends on several
other group manager components having been constructed.
complete
in interface Layer.FinalizeLayer
server
- The server using a layer implementing the FinalizeLayer
interface.
JgroupException
- Thrown if the layer could not be completed.public void viewChange(View view)
MembershipListener
MembershipListener
interface, when a view change occurs.
viewChange
in interface MembershipListener
view
- The new view that has been installed.MembershipService
public void prepareChange()
MembershipListener
prepareChange
in interface MembershipListener
MembershipService
public void hasLeft()
MembershipListener
leave
method has been invoked on the group membership
service.
hasLeft
in interface MembershipListener
MembershipService
public java.lang.Object getInternalTimestamp() throws java.rmi.RemoteException
InternalTimestamp
getInternalTimestamp
in interface InternalTimestamp
java.rmi.RemoteException
public TimestampService.Timestamp getTimestamp(int id)
TimestampService
Timestamp
object, and updates
the timestamp counter.
getTimestamp
in interface TimestampService
public long getTimestampCounter()
TimestampService
getTimestampCounter
in interface TimestampService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |