org.apache.geronimo.messaging.replication
Interface ReplicationCapable

All Superinterfaces:
Serializable
All Known Implementing Classes:
SimpleReplicatedMap

public interface ReplicationCapable
extends Serializable

TODO introduce versioning.

Version:
$Revision: 1.1 $ $Date: 2004/05/11 12:06:40 $

Method Summary
 void addUpdateListener(UpdateListener aListener)
          Adds an UpdateEvent listener.
 Object getID()
          Identifier of this ReplicationCapable.
 void mergeWithUpdate(UpdateEvent anEvent)
          Merges an UpdateEvent with the state of this instance.
 void removeUpdateListener(UpdateListener aListener)
          Removes the specified UpdateListener.
 void setID(Object anID)
          Sets the identifier of this instance in the scope of the replication group managing it.
 

Method Detail

getID

public Object getID()
Identifier of this ReplicationCapable. It identifies uniquely the instance in the scope of a replication group.
Identifiers are automatically created by ReplicationMembers upon registration.

Returns:
Identifier of this instance.

setID

public void setID(Object anID)
Sets the identifier of this instance in the scope of the replication group managing it.

Parameters:
anID - Identifier.

addUpdateListener

public void addUpdateListener(UpdateListener aListener)
Adds an UpdateEvent listener.

Parameters:
aListener - Listener to be notified when an update is performed on this instance.

removeUpdateListener

public void removeUpdateListener(UpdateListener aListener)
Removes the specified UpdateListener.

Parameters:
aListener - Listener to be removed.

mergeWithUpdate

public void mergeWithUpdate(UpdateEvent anEvent)
                     throws ReplicationException
Merges an UpdateEvent with the state of this instance.

Parameters:
anEvent - UpdateEvent to be merged with this instance.
Throws:
ReplicationException - Indicates that the merge can not be performed.


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.