org.openanzo.services
Class ReplicationProperties

java.lang.Object
  extended by org.openanzo.services.ReplicationProperties

public class ReplicationProperties
extends java.lang.Object

Configuration properties for the IReplicationService.

Author:
Generated Source from org.openanzo.utils.properties.jet

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

KEY_REPLICATION_MODE

public static final 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

    See Also:
    IReplicationService.REPLICATION_AUTOMATIC, IReplicationService.REPLICATION_IMMEDIATE_SYNC, IReplicationService.REPLICATION_IMMEDIATE_ASYNC, IReplicationService.REPLICATION_MANUAL, Constant Field Values

    KEY_REPLICATION_INTERVAL

    public static final 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.

    See Also:
    Constant Field Values

    KEY_REPLICATION_TIMEOUT

    public static final 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

    See Also:
    Constant Field Values

    KEY_REPLICATION_CLASS

    public static final 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
  • See Also:
    Constant Field Values
    Constructor Detail

    ReplicationProperties

    public ReplicationProperties()
    Method Detail

    getMode

    public static int getMode(java.util.Properties properties)
    Get KEY_REPLICATION_MODE property from properties

    Parameters:
    properties - containing configuration data
    Returns:
    value of KEY_REPLICATION_MODE,or "org.openanzo.services.IReplicationService.REPLICATION_MANUAL" if not present

    setMode

    public static void setMode(java.util.Properties properties,
                               int mode)
    Set KEY_REPLICATION_MODE property to mode in properties

    Parameters:
    properties - containing configuration data
    mode - value for mode

    getInterval

    public static long getInterval(java.util.Properties properties)
    Get KEY_REPLICATION_INTERVAL property from properties

    Parameters:
    properties - containing configuration data
    Returns:
    value of KEY_REPLICATION_INTERVAL,or "30000" if not present

    setInterval

    public static void setInterval(java.util.Properties properties,
                                   long interval)
    Set KEY_REPLICATION_INTERVAL property to interval in properties

    Parameters:
    properties - containing configuration data
    interval - value for interval

    getTimeout

    public static int getTimeout(java.util.Properties properties,
                                 int defaultValue)
    Get KEY_REPLICATION_TIMEOUT property from properties

    Parameters:
    properties - containing configuration data
    defaultValue - defaultValue for timeout
    Returns:
    value of KEY_REPLICATION_TIMEOUTor defaultValue if not present

    setTimeout

    public static void setTimeout(java.util.Properties properties,
                                  int timeout)
    Set KEY_REPLICATION_TIMEOUT property to timeout in properties

    Parameters:
    properties - containing configuration data
    timeout - value for timeout

    getReplicationClass

    public static java.lang.String getReplicationClass(java.util.Properties properties,
                                                       java.lang.String defaultValue)
    Get KEY_REPLICATION_CLASS property from properties

    Parameters:
    properties - containing configuration data
    defaultValue - defaultValue for replicationClass
    Returns:
    value of KEY_REPLICATION_CLASSor defaultValue if not present

    setReplicationClass

    public static void setReplicationClass(java.util.Properties properties,
                                           java.lang.String replicationClass)
    Set KEY_REPLICATION_CLASS property to replicationClass in properties

    Parameters:
    properties - containing configuration data
    replicationClass - value for replicationClass


    Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.