|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.services.ReplicationProperties
public class ReplicationProperties
Configuration properties for the IReplicationService.
| Field Summary | |
|---|---|
static java.lang.String |
KEY_REPLICATION_CLASS
Key for property "org.openanzo.replication.replicationClass" Class name for implementation of IReplicationService Client:Transport class used by client classes for replication calls Embedded:Transport class used by client classes for replication calls Examples: Client:org.openanzo.services.impl.WSReplicationService Embedded:org.openanzo.model.embedded.EmbeddedReplicationService |
static java.lang.String |
KEY_REPLICATION_INTERVAL
Key for property "org.openanzo.replication.interval" Time in milliseconds between replications when in REPLICATION_AUTOMATIC mode Examples: Default is 30000, or 30 seconds. |
static java.lang.String |
KEY_REPLICATION_MODE
Key for property "org.openanzo.replication.mode" Replication mode Client:How and when replication is initiated Embedded:See client Examples: 1 == IMMEDIATE SYNCH Replication started synchronously,blocking, immediately upon transaction commit 2 == AUTOMATIC Replication performed asynchronously at a set interval 3 == MANUAL Replication performed synchronously (as a blocking call in the same thread) through direct API 4 == IMMEDIATE ASYNC Replication started asynchronously (non blocking, in background) immediately upon transaction commit |
static java.lang.String |
KEY_REPLICATION_TIMEOUT
Key for property "org.openanzo.replication.timeout" Time in milliseconds to wait for replication calls to finish before throwing a timeout exception Examples: 0=Never timeout, 30000 would timeout after 30 seconds |
| Constructor Summary | |
|---|---|
ReplicationProperties()
|
|
| Method Summary | |
|---|---|
static long |
getInterval(java.util.Properties properties)
Get KEY_REPLICATION_INTERVAL property from properties |
static int |
getMode(java.util.Properties properties)
Get KEY_REPLICATION_MODE property from properties |
static java.lang.String |
getReplicationClass(java.util.Properties properties,
java.lang.String defaultValue)
Get KEY_REPLICATION_CLASS property from properties |
static int |
getTimeout(java.util.Properties properties,
int defaultValue)
Get KEY_REPLICATION_TIMEOUT property from properties |
static void |
setInterval(java.util.Properties properties,
long interval)
Set KEY_REPLICATION_INTERVAL property to interval in properties |
static void |
setMode(java.util.Properties properties,
int mode)
Set KEY_REPLICATION_MODE property to mode in properties |
static void |
setReplicationClass(java.util.Properties properties,
java.lang.String replicationClass)
Set KEY_REPLICATION_CLASS property to replicationClass in properties |
static void |
setTimeout(java.util.Properties properties,
int timeout)
Set KEY_REPLICATION_TIMEOUT property to timeout in properties |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String KEY_REPLICATION_MODE
IReplicationService.REPLICATION_AUTOMATIC,
IReplicationService.REPLICATION_IMMEDIATE_SYNC,
IReplicationService.REPLICATION_IMMEDIATE_ASYNC,
IReplicationService.REPLICATION_MANUAL,
Constant Field Valuespublic static final java.lang.String KEY_REPLICATION_INTERVAL
public static final java.lang.String KEY_REPLICATION_TIMEOUT
public static final java.lang.String KEY_REPLICATION_CLASS
| Constructor Detail |
|---|
public ReplicationProperties()
| Method Detail |
|---|
public static int getMode(java.util.Properties properties)
KEY_REPLICATION_MODE property from properties
properties - containing configuration data
KEY_REPLICATION_MODE,or "org.openanzo.services.IReplicationService.REPLICATION_MANUAL" if not present
public static void setMode(java.util.Properties properties,
int mode)
KEY_REPLICATION_MODE property to mode in properties
properties - containing configuration datamode - value for modepublic static long getInterval(java.util.Properties properties)
KEY_REPLICATION_INTERVAL property from properties
properties - containing configuration data
KEY_REPLICATION_INTERVAL,or "30000" if not present
public static void setInterval(java.util.Properties properties,
long interval)
KEY_REPLICATION_INTERVAL property to interval in properties
properties - containing configuration datainterval - value for interval
public static int getTimeout(java.util.Properties properties,
int defaultValue)
KEY_REPLICATION_TIMEOUT property from properties
properties - containing configuration datadefaultValue - defaultValue for timeout
KEY_REPLICATION_TIMEOUTor defaultValue if not present
public static void setTimeout(java.util.Properties properties,
int timeout)
KEY_REPLICATION_TIMEOUT property to timeout in properties
properties - containing configuration datatimeout - value for timeout
public static java.lang.String getReplicationClass(java.util.Properties properties,
java.lang.String defaultValue)
KEY_REPLICATION_CLASS property from properties
properties - containing configuration datadefaultValue - defaultValue for replicationClass
KEY_REPLICATION_CLASSor defaultValue if not present
public static void setReplicationClass(java.util.Properties properties,
java.lang.String replicationClass)
KEY_REPLICATION_CLASS property to replicationClass in properties
properties - containing configuration datareplicationClass - value for replicationClass
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||