|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.directory.mitosis.service.DefaultReplicationContext
public class DefaultReplicationContext
The default implementation of ReplicationContext
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.directory.mitosis.service.ReplicationContext |
|---|
ReplicationContext.State |
| Constructor Summary | |
|---|---|
DefaultReplicationContext(ReplicationService service,
DirectoryServiceConfiguration serviceCfg,
ReplicationConfiguration configuration,
IoSession session)
|
|
| Method Summary | |
|---|---|
void |
cancelAllExpirations()
Cancells all scheduled expirations. |
java.lang.Object |
cancelExpiration(int sequence)
Cancels the expiration scheduled by calling ReplicationContext.scheduleExpiration(Object). |
ReplicationConfiguration |
getConfiguration()
Returns the current ReplicationConfiguration of the
Replica which is managing this context. |
int |
getNextSequence()
Generates a new and unique sequence number of protocol message. |
Replica |
getPeer()
Returns the remote peer Replica that this context is connected
to. |
int |
getScheduledExpirations()
Returns the number of the scheduled experations. |
ReplicationService |
getService()
Returns the ReplicationService which is managing this
context. |
DirectoryServiceConfiguration |
getServiceConfiguration()
Returns the DirectoryServiceConfiguration which owns the
ReplicationService which is managing this context. |
IoSession |
getSession()
Returns MINA IoSession
instance that is associated with the current connection to
the remote Replica. |
ReplicationContext.State |
getState()
Returns the current state of the Replica this context is
managing. |
boolean |
replicate()
Forces this context to send replication data to the peer replica immediately. |
void |
scheduleExpiration(java.lang.Object message)
Schedules an expiration of the specified message. |
void |
setPeer(Replica peer)
Sets the remote peer Replica that this context is connected
to. |
void |
setState(ReplicationContext.State state)
Sets the current state of the Replica this context is
managing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultReplicationContext(ReplicationService service,
DirectoryServiceConfiguration serviceCfg,
ReplicationConfiguration configuration,
IoSession session)
| Method Detail |
|---|
public ReplicationService getService()
ReplicationContextReplicationService which is managing this
context.
getService in interface ReplicationContextpublic ReplicationConfiguration getConfiguration()
ReplicationContextReplicationConfiguration of the
Replica which is managing this context.
getConfiguration in interface ReplicationContextpublic DirectoryServiceConfiguration getServiceConfiguration()
ReplicationContextDirectoryServiceConfiguration which owns the
ReplicationService which is managing this context.
getServiceConfiguration in interface ReplicationContextpublic IoSession getSession()
ReplicationContextIoSession
instance that is associated with the current connection to
the remote Replica.
getSession in interface ReplicationContextpublic int getNextSequence()
ReplicationContext
getNextSequence in interface ReplicationContextpublic Replica getPeer()
ReplicationContextReplica that this context is connected
to.
getPeer in interface ReplicationContextpublic void setPeer(Replica peer)
ReplicationContextReplica that this context is connected
to. A user has authenticate the remote peer first and call this method
manually to prevent unauthorized access.
setPeer in interface ReplicationContextpublic ReplicationContext.State getState()
ReplicationContextReplica this context is
managing.
getState in interface ReplicationContextpublic void setState(ReplicationContext.State state)
ReplicationContextReplica this context is
managing.
setState in interface ReplicationContextpublic void scheduleExpiration(java.lang.Object message)
ReplicationContextReplicationContext.cancelExpiration(int) method is not
invoked within a certain timeout, an exception will be raised to
ReplicationContextHandler.exceptionCaught(ReplicationContext, Throwable).
scheduleExpiration in interface ReplicationContextpublic java.lang.Object cancelExpiration(int sequence)
ReplicationContextReplicationContext.scheduleExpiration(Object). A user of this context could
call this method when the response message has been received to
stop the expiration for the message with the specified
sequence number.
cancelExpiration in interface ReplicationContextpublic boolean replicate()
ReplicationContext
replicate in interface ReplicationContextpublic void cancelAllExpirations()
ReplicationContext
cancelAllExpirations in interface ReplicationContextpublic int getScheduledExpirations()
ReplicationContextOutOfMemoryError by limiting the number
of the messages which didn't get their responses.
getScheduledExpirations in interface ReplicationContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||