|
|||||||||
| 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 ReplicationService. This configuration can be
used by calling ReplicationService.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
Replicas. |
|
| Method Summary | |
|---|---|
void |
addPeerReplica(Replica peer)
Adds the specified Replica to the remote peer replica list. |
CSNFactory |
getCsnFactory()
Returns the CSNFactory for generating CSNs. |
int |
getLogMaxAge()
Returns the maximum age (days) of change logs stored in ReplicationStore. |
java.util.Set<Replica> |
getPeerReplicas()
Returns the remote peer replica list. |
ReplicaId |
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 ReplicationService
listens to. |
ReplicationStore |
getStore()
Returns the ReplicationStore which stores the change log
of the replica this configuration is configuring. |
UUIDFactory |
getUuidFactory()
Returns the UUIDFactory which generates UUIDs for
new directory entries. |
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 CSNs. |
void |
setLogMaxAge(int logMaxAge)
Sets the maximum age (days) of change logs stored in ReplicationStore. |
void |
setPeerReplicas(java.util.Set replicas)
Sets the remote peer replica list. |
void |
setReplicaId(ReplicaId 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 ReplicationService
listens to. |
void |
setStore(ReplicationStore store)
Sets the ReplicationStore which stores the change log
of the replica this configuration is configuring. |
void |
setUuidFactory(UUIDFactory uuidFactory)
Sets the UUIDFactory which generates UUIDs for
new directory entries. |
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
Replicas. You can set these properties by calling
setReplicaId(ReplicaId) and setPeerReplicas(Set)
respectively.
| Method Detail |
|---|
public int getServerPort()
ReplicationService
listens to. The default value is DEFAULT_SERVER_PORT.
public void setServerPort(int serverPort)
ReplicationService
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 CSNs.
The default factory is SimpleCSNFactory.
public void setCsnFactory(CSNFactory csnFactory)
CSNFactory for generating CSNs.
The default factory is SimpleCSNFactory.
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 replicas)
public ReplicaId getReplicaId()
public void setReplicaId(ReplicaId 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 UUIDFactory getUuidFactory()
UUIDFactory which generates UUIDs for
new directory entries. The default implementation is
SimpleUUIDFactory.
public void setUuidFactory(UUIDFactory uuidFactory)
UUIDFactory which generates UUIDs for
new directory entries. The default implementation is
SimpleUUIDFactory.
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 | ||||||||