|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.mitosis.configuration.ReplicationConfiguration
public class ReplicationConfiguration
A configuration for ReplicationInterceptor
. This configuration can be
used by calling ReplicationInterceptor.setConfiguration(ReplicationConfiguration)
.
Field Summary | |
---|---|
static int |
DEFAULT_LOG_MAX_AGE
|
static int |
DEFAULT_REPLICATION_INTERVAL
|
static int |
DEFAULT_RESPONSE_TIMEOUT
|
static int |
DEFAULT_SERVER_PORT
|
Constructor Summary | |
---|---|
ReplicationConfiguration()
Creates a new instance with default properties except for the ReplicaId of the service and the the list of peer
Replica s. |
Method Summary | |
---|---|
void |
addPeerReplica(Replica peer)
Adds the specified Replica to the remote peer replica list. |
CSNFactory |
getCsnFactory()
Returns the CSNFactory for generating CSN s. |
int |
getLogMaxAge()
Returns the maximum age (days) of change logs stored in ReplicationStore . |
java.util.Set<Replica> |
getPeerReplicas()
Returns the remote peer replica list. |
java.lang.String |
getReplicaId()
Returns the ID of the replica this configuration is configuring. |
int |
getReplicationInterval()
Returns the replication data exchange interval (seconds) between two replicas. |
int |
getResponseTimeout()
Returns the response timeout value (seconds) for each sent message during the communication between replicas. |
int |
getServerPort()
Returns the TCP/IP port number that a ReplicationInterceptor
listens to. |
ReplicationStore |
getStore()
Returns the ReplicationStore which stores the change log
of the replica this configuration is configuring. |
void |
removeAllPeerReplicas()
Clears the remote peer replica list. |
void |
removePeerReplica(Replica peer)
Removed the specified Replica from the remote peer replica list. |
void |
setCsnFactory(CSNFactory csnFactory)
+ Sets the CSNFactory for generating CSN s. |
void |
setLogMaxAge(int logMaxAge)
Sets the maximum age (days) of change logs stored in ReplicationStore . |
void |
setPeerReplicas(java.util.Set<java.lang.Object> replicas)
Sets the remote peer replica list. |
void |
setReplicaId(java.lang.String replicaId)
Sets the ID of the replica this configuration is configuring. |
void |
setReplicationInterval(int replicationInterval)
Sets the replication data exchange interval (seconds) between two replicas. |
void |
setResponseTimeout(int responseTimeout)
Sets the response timeout value (seconds) for each sent message during the communication between replicas. |
void |
setServerPort(int serverPort)
Sets the TCP/IP port number that a ReplicationInterceptor
listens to. |
void |
setStore(ReplicationStore store)
Sets the ReplicationStore which stores the change log
of the replica this configuration is configuring. |
void |
validate()
Validate Mitosis configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_LOG_MAX_AGE
public static final int DEFAULT_REPLICATION_INTERVAL
public static final int DEFAULT_RESPONSE_TIMEOUT
public static final int DEFAULT_SERVER_PORT
Constructor Detail |
---|
public ReplicationConfiguration()
ReplicaId
of the service and the the list of peer
Replica
s. You can set these properties by calling
#setReplicaId(ReplicaId)
and setPeerReplicas(Set)
respectively.
Method Detail |
---|
public int getServerPort()
ReplicationInterceptor
listens to. The default value is DEFAULT_SERVER_PORT
.
public void setServerPort(int serverPort)
ReplicationInterceptor
listens to. The default value is DEFAULT_SERVER_PORT
.
public int getResponseTimeout()
DEFAULT_RESPONSE_TIMEOUT
.
public void setResponseTimeout(int responseTimeout)
DEFAULT_RESPONSE_TIMEOUT
.
public int getReplicationInterval()
DEFAULT_REPLICATION_INTERVAL
.
public void setReplicationInterval(int replicationInterval)
DEFAULT_REPLICATION_INTERVAL
.
replicationInterval
- 0 or below to disable automatic replication.public CSNFactory getCsnFactory()
CSNFactory
for generating CSN
s.
The default factory is DefaultCSNFactory
.
public void setCsnFactory(CSNFactory csnFactory)
CSNFactory
for generating CSN
s.
The default factory is DefaultCSNFactory
.
public void addPeerReplica(Replica peer)
Replica
to the remote peer replica list.
public void removePeerReplica(Replica peer)
Replica
from the remote peer replica list.
public void removeAllPeerReplicas()
public java.util.Set<Replica> getPeerReplicas()
public void setPeerReplicas(java.util.Set<java.lang.Object> replicas)
public java.lang.String getReplicaId()
public void setReplicaId(java.lang.String replicaId)
public ReplicationStore getStore()
ReplicationStore
which stores the change log
of the replica this configuration is configuring. The default
implementation is DerbyReplicationStore
.
public void setStore(ReplicationStore store)
ReplicationStore
which stores the change log
of the replica this configuration is configuring. The default
implementation is DerbyReplicationStore
.
public int getLogMaxAge()
ReplicationStore
. Any change logs and deleted entries
older than this value will be purged periodically. The default value
is DEFAULT_LOG_MAX_AGE
.
public void setLogMaxAge(int logMaxAge)
ReplicationStore
. Any change logs and deleted entries
older than this value will be purged periodically. The default value
is DEFAULT_LOG_MAX_AGE
.
public void validate() throws ReplicationConfigurationException
ReplicationConfigurationException
- If the configuration file is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |