XADisk 1.2
xadisk.java.net

org.xadisk.filesystem
Class FileSystemConfiguration

java.lang.Object
  extended by org.xadisk.filesystem.FileSystemConfiguration
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
StandaloneFileSystemConfiguration

public class FileSystemConfiguration
extends Object
implements Serializable

An object of this class encapsulates the configuration for the XADisk instance, and is used while booting of the XADisk instance.

  1. When deploying XADisk as a JCA Resource Adapter, this configuration object is automatically constructed and initialized by the JavaEE container (based on the deployment descriptor).
  2. When booting the XADisk instance directly, an instance of subclass StandaloneFileSystemConfiguration is used to set/override the various configuration properties, and is subsequently passed to the bootup method.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
  FileSystemConfiguration()
          A constructor called by the JavaEE Container while deploying XADisk JCA Resource Adapter.
protected FileSystemConfiguration(String xaDiskHome, String instanceId)
          A constructor called by constructor of subclass StandaloneFileSystemConfiguration.
 
Method Summary
 Integer getBufferPoolRelieverInterval()
          Returns the value of bufferPoolRelieverInterval.
 Integer getBufferSize()
          Returns the value of bufferSize (a performance tuning property).
 String getClusterMasterAddress()
          Returns the value of clusterMasterAddress.
 Integer getClusterMasterPort()
          Returns the value of clusterMasterPort.
 Integer getCumulativeBufferSizeForDiskWrite()
          Returns the value of cumulativeBufferSizeForDiskWrite (a performance tuning property).
 Integer getDeadLockDetectorInterval()
          Returns the value of deadLockDetectorInterval.
 Integer getDirectBufferIdleTime()
          Returns the value of directBufferIdleTime (a performance tuning property).
 Integer getDirectBufferPoolSize()
          Returns the value of directBufferPoolSize (a performance tuning property).
 Boolean getEnableClusterMode()
          Returns the value of enableClusterMode.
 Boolean getEnableRemoteInvocations()
          Returns the value of enableRemoteInvocations.
 String getInstanceId()
          Returns the value of instanceId, a mandatory configuration property.
 Integer getLockTimeOut()
          Returns the value of lockTimeOut.
 Integer getMaximumConcurrentEventDeliveries()
          Returns the value of maximumConcurrentEventDeliveries.
 Long getMaxNonPooledBufferSize()
          Returns the value of maxNonPooledBufferSize (a performance tuning property).
 Integer getNonDirectBufferIdleTime()
          Returns the value of nonDirectBufferIdleTime (a performance tuning property).
 Integer getNonDirectBufferPoolSize()
          Returns the value of nonDirectBufferPoolSize (a performance tuning property).
 String getServerAddress()
          Returns the value of serverAddress.
 Integer getServerPort()
          Returns the value of serverPort.
 Boolean getSynchronizeDirectoryChanges()
          Returns the value of synchronizeDirectoryChanges.
 Long getTransactionLogFileMaxSize()
          Returns the value of transactionLogFileMaxSize.
 Integer getTransactionTimeout()
          Returns the value of transactionTimeout.
 String getXaDiskHome()
          Returns the value of xaDiskHome (also referred to as XADisk System Directory), a mandatory configuration property.
 void setBufferPoolRelieverInterval(Integer bufferPoolRelieverInterval)
          Sets the value of bufferPoolRelieverInterval.
 void setBufferSize(Integer bufferSize)
          Sets the value of bufferSize (a performance tuning property).
 void setClusterMasterAddress(String clusterMasterAddress)
          Sets the value of clusterMasterAddress.
 void setClusterMasterPort(Integer clusterMasterPort)
          Sets the value of clusterMasterPort.
 void setCumulativeBufferSizeForDiskWrite(Integer cumulativeBufferSizeForDiskWrite)
          Sets the value of cumulativeBufferSizeForDiskWrite (a performance tuning property).
 void setDeadLockDetectorInterval(Integer deadLockDetectorInterval)
          Sets the value of deadLockDetectorInterval.
 void setDirectBufferIdleTime(Integer directBufferIdleTime)
          Sets the value of directBufferIdleTime (a performance tuning property).
 void setDirectBufferPoolSize(Integer directBufferPoolSize)
          Sets the value of directBufferPoolSize (a performance tuning property).
 void setEnableClusterMode(Boolean enableClusterMode)
          Sets the value of enableClusterMode.
 void setEnableRemoteInvocations(Boolean enableRemoteInvocations)
          Sets the value of enableRemoteInvocations.
 void setInstanceId(String instanceId)
          Sets the value of instanceId, a mandatory configuration property.
 void setLockTimeOut(Integer lockTimeOut)
          Sets the value of lockTimeOut.
 void setMaximumConcurrentEventDeliveries(Integer maximumConcurrentEventDeliveries)
          Sets the value of maximumConcurrentEventDeliveries.
 void setMaxNonPooledBufferSize(Long maxNonPooledBufferSize)
          Sets the value of maxNonPooledBufferSize (a performance tuning property).
 void setNonDirectBufferIdleTime(Integer nonDirectBufferIdleTime)
          Sets the value of nonDirectBufferIdleTime (a performance tuning property).
 void setNonDirectBufferPoolSize(Integer nonDirectBufferPoolSize)
          Sets the value of nonDirectBufferPoolSize (a performance tuning property).
 void setServerAddress(String serverAddress)
          Sets the value of serverAddress.
 void setServerPort(Integer serverPort)
          Sets the value of serverPort.
 void setSynchronizeDirectoryChanges(Boolean synchronizeDirectoryChanges)
          Sets the value of synchronizeDirectoryChanges.
 void setTransactionLogFileMaxSize(Long transactionLogFileMaxSize)
          Sets the value of transactionLogFileMaxSize.
 void setTransactionTimeout(Integer transactionTimeout)
          Sets the value of transactionTimeout.
 void setXaDiskHome(String xaDiskHome)
          Sets the value of xaDiskHome (also referred to as XADisk System Directory), a mandatory configuration property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemConfiguration

public FileSystemConfiguration()
A constructor called by the JavaEE Container while deploying XADisk JCA Resource Adapter. The container will subsequently call setter methods to set properties of this configuration object. (JavaBean approach).


FileSystemConfiguration

protected FileSystemConfiguration(String xaDiskHome,
                                  String instanceId)
A constructor called by constructor of subclass StandaloneFileSystemConfiguration.

Parameters:
xaDiskHome - the XADisk System Directory path.
instanceId - the instance-id for the new XADisk instance; must be unique within the JVM.
Method Detail

getBufferSize

public Integer getBufferSize()
Returns the value of bufferSize (a performance tuning property).

The i/o streams of XADisk, XAFileInputStream and XAFileOutputStream, use byte-buffers for holding file's contents. These byte-buffers are either from buffer pool or normally allocated (if the pool is exhausted).

This property decides the size of these byte-buffers, both for pooled and normal cases.

Default value is 4096.

Returns:
value of bufferSize, in bytes.

setBufferSize

public void setBufferSize(Integer bufferSize)
Sets the value of bufferSize (a performance tuning property).

The i/o streams of XADisk, XAFileInputStream and XAFileOutputStream, use byte-buffers for holding file's contents. These byte-buffers are either from buffer pool or normally allocated (if the pool is exhausted).

This property decides the size of these byte-buffers, both for pooled and normal cases.

Default value is 4096.

Parameters:
bufferSize - new value of bufferSize, in bytes.

getDirectBufferPoolSize

public Integer getDirectBufferPoolSize()
Returns the value of directBufferPoolSize (a performance tuning property).

It specifies the pool size for the 'direct' (ByteBuffer.isDirect()) byte buffers. Pooled buffers (direct or indirect) are used by i/o streams XAFileInputStream and XAFileOutputStream for holding file's contents.

Default value is 1000 (means, at most 1000 direct buffers can exist in the pool).

Returns:
value of directBufferPoolSize.

setDirectBufferPoolSize

public void setDirectBufferPoolSize(Integer directBufferPoolSize)
Sets the value of directBufferPoolSize (a performance tuning property).

It specifies the pool size for the 'direct' (ByteBuffer.isDirect()) byte buffers. Pooled buffers (direct or indirect) are used by i/o streams XAFileInputStream and XAFileOutputStream for holding file's contents.

Default value is 1000 (means, at most 1000 direct buffers can exist in the pool).

Parameters:
directBufferPoolSize - new value of directBufferPoolSize.

getNonDirectBufferPoolSize

public Integer getNonDirectBufferPoolSize()
Returns the value of nonDirectBufferPoolSize (a performance tuning property).

It specifies the pool size for the 'nonDirect' (ByteBuffer.isDirect()) byte buffers. Pooled buffers (direct or indirect) are used by i/o streams XAFileInputStream and XAFileOutputStream for holding file's contents.

Default value is 1000 (means, at most 1000 nonDirect buffers can exist in the pool).

Returns:
value of nonDirectBufferPoolSize.

setNonDirectBufferPoolSize

public void setNonDirectBufferPoolSize(Integer nonDirectBufferPoolSize)
Sets the value of nonDirectBufferPoolSize (a performance tuning property).

It specifies the pool size for the 'nonDirect' (ByteBuffer.isDirect()) byte buffers. Pooled buffers (direct or indirect) are used by i/o streams XAFileInputStream and XAFileOutputStream for holding file's contents.

Default value is 1000 (means, at most 1000 nonDirect buffers can exist in the pool).

Parameters:
nonDirectBufferPoolSize - new value of nonDirectBufferPoolSize.

getXaDiskHome

public String getXaDiskHome()
Returns the value of xaDiskHome (also referred to as XADisk System Directory), a mandatory configuration property.

This is a directory where XADisk keeps all of its artifacts required for its functioning. One of the important things XADisk keeps here is the transaction logs.

The directory that you specify need not exist. If it exists, it must not be anything other than the one you used for XADisk sometime earlier. If it does not exist, XADisk creates it during initialization.

You should not do any kind of modifications inside this directory; as it may lead to failure of XADisk.

No two XADisk instances should use the same system directory.

Returns:
value of xaDiskHome.

setXaDiskHome

public void setXaDiskHome(String xaDiskHome)
Sets the value of xaDiskHome (also referred to as XADisk System Directory), a mandatory configuration property.

This is a directory where XADisk keeps all of its artifacts required for its functioning. One of the important things XADisk keeps here is the transaction logs.

The directory that you specify need not exist. If it exists, it must not be anything other than the one you used for XADisk sometime earlier. If it does not exist, XADisk creates it during initialization.

You should not do any kind of modifications inside this directory; as it may lead to failure of XADisk.

No two XADisk instances should use the same system directory.

Parameters:
xaDiskHome - new value of xaDiskHome.

getInstanceId

public String getInstanceId()
Returns the value of instanceId, a mandatory configuration property.

An instance-id uniquely identifies an XADisk instance within a JVM (as multiple XADisk instances can be running within the same JVM).

The new XADisk instance (booted directly or via deployment of XADisk JCA Resource Adapter) will be linked to this instanceId.

Value of instance-id cannot be null or empty string.

Returns:
value of instanceId.

setInstanceId

public void setInstanceId(String instanceId)
Sets the value of instanceId, a mandatory configuration property.

An instance-id uniquely identifies an XADisk instance within a JVM (as multiple XADisk instances can be running within the same JVM).

The new XADisk instance (booted directly or via deployment of XADisk JCA Resource Adapter) will be linked to this instanceId.

Value of instance-id cannot be null or empty string.

Parameters:
instanceId - new value of instanceId.

getTransactionLogFileMaxSize

public Long getTransactionLogFileMaxSize()
Returns the value of transactionLogFileMaxSize.

This is the maximum size of a transaction log file (in bytes). XADisk maintains a transaction log and rotates the current transaction log if its size exceeds this value.

You should set this value according to the maximum file-size allowed by your file-system (in which the XADisk System Directory resides).

Default value is 1000000000 (1 GB).

Returns:
value of transactionLogFileMaxSize, in bytes.

setTransactionLogFileMaxSize

public void setTransactionLogFileMaxSize(Long transactionLogFileMaxSize)
Sets the value of transactionLogFileMaxSize.

This is the maximum size of a transaction log file (in bytes). XADisk maintains a transaction log and rotates the current transaction log if its size exceeds this value.

You should set this value according to the maximum file-size allowed by your file-system (in which the XADisk System Directory resides).

Default value is 1000000000 (1 GB).

Parameters:
transactionLogFileMaxSize - new value of transactionLogFileMaxSize.

getCumulativeBufferSizeForDiskWrite

public Integer getCumulativeBufferSizeForDiskWrite()
Returns the value of cumulativeBufferSizeForDiskWrite (a performance tuning property).

XADisk doesn't write its transaction logs one-by-one separately, to the disk; it does so in big enough batches. This property mentions total size of transaction logs, in bytes, when such a disk write takes place.

Default value is 1000000 bytes (1 MB).

Returns:
value of cumulativeBufferSizeForDiskWrite, in bytes.

setCumulativeBufferSizeForDiskWrite

public void setCumulativeBufferSizeForDiskWrite(Integer cumulativeBufferSizeForDiskWrite)
Sets the value of cumulativeBufferSizeForDiskWrite (a performance tuning property).

XADisk doesn't write its transaction logs one-by-one separately, to the disk; it does so in big enough batches. This property mentions total size of transaction logs, in bytes, when such a disk write takes place.

Default value is 1000000 bytes (1 MB).

Parameters:
cumulativeBufferSizeForDiskWrite - new value of cumulativeBufferSizeForDiskWrite.

getDirectBufferIdleTime

public Integer getDirectBufferIdleTime()
Returns the value of directBufferIdleTime (a performance tuning property).

This is the number of seconds after which any 'direct' (ByteBuffer.isDirect()) pooled buffer is considered idle if not in use.

An idle buffer is freed by a background thread which runs periodically. The frequency of this thread is decided by a property called bufferPoolRelieverInterval.

Default value is 100 seconds.

Returns:
value of directBufferIdleTime, in seconds.

setDirectBufferIdleTime

public void setDirectBufferIdleTime(Integer directBufferIdleTime)
Sets the value of directBufferIdleTime (a performance tuning property).

This is the number of seconds after which any 'direct' (ByteBuffer.isDirect()) pooled buffer is considered idle if not in use.

An idle buffer is freed by a background thread which runs periodically. The frequency of this thread is decided by a property called bufferPoolRelieverInterval.

Default value is 100 seconds.

Parameters:
directBufferIdleTime - new value of directBufferIdleTime.

getNonDirectBufferIdleTime

public Integer getNonDirectBufferIdleTime()
Returns the value of nonDirectBufferIdleTime (a performance tuning property).

This is the number of seconds after which any 'nonDirect' (ByteBuffer.isDirect()) pooled buffer is considered idle if not in use.

An idle buffer is freed by a background thread which runs periodically. The frequency of this thread is decided by a property called bufferPoolRelieverInterval.

Default value is 100 seconds.

Returns:
value of nonDirectBufferIdleTime, in seconds.

setNonDirectBufferIdleTime

public void setNonDirectBufferIdleTime(Integer nonDirectBufferIdleTime)
Sets the value of nonDirectBufferIdleTime (a performance tuning property).

This is the number of seconds after which any 'nonDirect' (ByteBuffer.isDirect()) pooled buffer is considered idle if not in use.

An idle buffer is freed by a background thread which runs periodically. The frequency of this thread is decided by a property called bufferPoolRelieverInterval.

Default value is 100 seconds.

Parameters:
nonDirectBufferIdleTime - new value of nonDirectBufferIdleTime.

getBufferPoolRelieverInterval

public Integer getBufferPoolRelieverInterval()
Returns the value of bufferPoolRelieverInterval.

This property decides the time interval in which a service thread for de-allocating the idle buffers in the buffer pool will get run.

Default value is 60 seconds.

Returns:
value of bufferPoolRelieverInterval, in seconds.

setBufferPoolRelieverInterval

public void setBufferPoolRelieverInterval(Integer bufferPoolRelieverInterval)
Sets the value of bufferPoolRelieverInterval.

This property decides the time interval in which a service thread for de-allocating the idle buffers in the buffer pool will get run.

Default value is 60 seconds.

Parameters:
bufferPoolRelieverInterval - new value of bufferPoolRelieverInterval.

getMaxNonPooledBufferSize

public Long getMaxNonPooledBufferSize()
Returns the value of maxNonPooledBufferSize (a performance tuning property).

XADisk tries to hold its ongoing transactions' logs in memory using byte-buffers. Similarly, such byte-buffers are also used by i/o streams XAFileInputStream and XAFileOutputStream for holding file's contents if the pooled buffers are all exhausted.

As these byte-buffers add to the total memory consumption, but at the same time do boost performance, this property can be used to put an upper limit on the total size of these buffers.

Default value is 1000000 (1 MB).

Returns:
value of maxNonPooledBufferSize.

setMaxNonPooledBufferSize

public void setMaxNonPooledBufferSize(Long maxNonPooledBufferSize)
Sets the value of maxNonPooledBufferSize (a performance tuning property).

XADisk tries to hold its ongoing transactions' logs in memory using byte-buffers. Similarly, such byte-buffers are also used by i/o streams XAFileInputStream and XAFileOutputStream for holding file's contents if the pooled buffers are all exhausted.

As these byte-buffers add to the total memory consumption, but at the same time do boost performance, this property can be used to put an upper limit on the total size of these buffers.

Default value is 1000000 (1 MB).

Parameters:
maxNonPooledBufferSize - new value of maxNonPooledBufferSize.

getDeadLockDetectorInterval

public Integer getDeadLockDetectorInterval()
Returns the value of deadLockDetectorInterval.

This is the time interval (in seconds) in which the deadlock detection mechanism gets triggered to detect deadlocks in the system and to take appropriate action to remedy them.

Default value is 30 seconds.

Returns:
value of deadLockDetectorInterval, in seconds.

setDeadLockDetectorInterval

public void setDeadLockDetectorInterval(Integer deadLockDetectorInterval)
Sets the value of deadLockDetectorInterval.

This is the time interval (in seconds) in which the deadlock detection mechanism gets triggered to detect deadlocks in the system and to take appropriate action to remedy them.

Default value is 30 seconds.

Parameters:
deadLockDetectorInterval - new value of deadLockDetectorInterval.

getLockTimeOut

public Integer getLockTimeOut()
Returns the value of lockTimeOut.

This is the time duration (in milliseconds) for which a request to acquire a lock (over a file/directory) will wait if the lock is not immediately available. If the wait time exceeds this value, LockingTimedOutException is thrown to the application to let it know.

Default value is 10000 (10 seconds).

Returns:
value of lockTimeOut, in milliseconds.

setLockTimeOut

public void setLockTimeOut(Integer lockTimeOut)
Sets the value of lockTimeOut.

This is the time duration (in milliseconds) for which a request to acquire a lock (over a file/directory) will wait if the lock is not immediately available. If the wait time exceeds this value, LockingTimedOutException is thrown to the application to let it know.

Default value is 10000 (10 seconds).

Parameters:
lockTimeOut - new value of lockTimeOut.

getMaximumConcurrentEventDeliveries

public Integer getMaximumConcurrentEventDeliveries()
Returns the value of maximumConcurrentEventDeliveries.

This is the maximum number of Message Driven Beans invoked by XADisk concurrently to process the events from XADisk.

Default value is 20.

Returns:
value of maximumConcurrentEventDeliveries.

setMaximumConcurrentEventDeliveries

public void setMaximumConcurrentEventDeliveries(Integer maximumConcurrentEventDeliveries)
Sets the value of maximumConcurrentEventDeliveries.

This is the maximum number of Message Driven Beans invoked by XADisk concurrently to process the events from XADisk.

Default value is 20.

Parameters:
maximumConcurrentEventDeliveries - new value of maximumConcurrentEventDeliveries.

getTransactionTimeout

public Integer getTransactionTimeout()
Returns the value of transactionTimeout.

This is maximum time (in seconds) for which any transaction in the system will be allowed to remain 'open'.

If a transaction times out, it will be rolled-back by the transaction timeout mechanism.

Default value is 60 seconds.

Returns:
value of transactionTimeout, in seconds.

setTransactionTimeout

public void setTransactionTimeout(Integer transactionTimeout)
Sets the value of transactionTimeout.

This is maximum time (in seconds) for which any transaction in the system will be allowed to remain 'open'.

If a transaction times out, it will be rolled-back by the transaction timeout mechanism.

Default value is 60 seconds.

Parameters:
transactionTimeout - new value of transactionTimeout.

getServerAddress

public String getServerAddress()
Returns the value of serverAddress.

See the description for getEnableRemoteInvocations().

Default value is '127.0.0.1', which will allow the XADisk instance to serve only those applications running on the same machine as the XADisk instance.

Returns:
value of serverAddress.

setServerAddress

public void setServerAddress(String serverAddress)
Sets the value of serverAddress.

See the description for getEnableRemoteInvocations().

Default value is '127.0.0.1', which will allow the XADisk instance to serve only those applications running on the same machine as the XADisk instance.

Parameters:
serverAddress - new value of serverAddress.

getServerPort

public Integer getServerPort()
Returns the value of serverPort.

See the description for getEnableRemoteInvocations().

Default value is 9999.

Returns:
value of serverPort.

setServerPort

public void setServerPort(Integer serverPort)
Sets the value of serverPort.

See the description for getEnableRemoteInvocations().

Default value is 9999.

Parameters:
serverPort - new value of serverPort.

getEnableRemoteInvocations

public Boolean getEnableRemoteInvocations()
Returns the value of enableRemoteInvocations.

An XADisk instance can be configured to receive remote invocations. This allows remote application clients to perform operations over the XADisk instance. This feature also allows XADisk JCA Resource Adapter to facilitate inbound messaging from remote XADisk instances to the MDBs deployed in the same JavaEE Server.

The following configuration is required to enable an XADisk instance to accept such remote invocations:

  1. enableRemoteInvocations flag must be set to true.
  2. serverAddress should be set such that the applications running on the remote JVMs can contact this XADisk instance using this address.
  3. serverPort should be set to a port available on the machine. The XADisk instance would listen at the specified port to receive calls from remote applications.

Default value is false.

Returns:
value of enableRemoteInvocations.

setEnableRemoteInvocations

public void setEnableRemoteInvocations(Boolean enableRemoteInvocations)
Sets the value of enableRemoteInvocations.

An XADisk instance can be configured to receive remote invocations. This allows remote application clients to perform operations over the XADisk instance. This feature also allows XADisk JCA Resource Adapter to facilitate inbound messaging from remote XADisk instances to the MDBs deployed in the same JavaEE Server.

The following configuration is required to enable an XADisk instance to accept such remote invocations:

  1. enableRemoteInvocations flag must be set to true.
  2. serverAddress should be set such that the applications running on the remote JVMs can contact this XADisk instance using this address.
  3. serverPort should be set to a port available on the machine. The XADisk instance would listen at the specified port to receive calls from remote applications.

Default value is false.

Parameters:
enableRemoteInvocations - new value of enableRemoteInvocations.

getSynchronizeDirectoryChanges

public Boolean getSynchronizeDirectoryChanges()
Returns the value of synchronizeDirectoryChanges.

This flag can be used to specify whether the XADisk instance must synchronize directory changes to the disk during transaction commit.

If this flag is set to false, directory changes (create/delete children) done inside a transaction may not get synchronized to the disk at commit.

Default value is true.

Returns:
value of synchronizeDirectoryChanges.
Since:
1.1

setSynchronizeDirectoryChanges

public void setSynchronizeDirectoryChanges(Boolean synchronizeDirectoryChanges)
Sets the value of synchronizeDirectoryChanges.

This flag can be used to specify whether the XADisk instance must synchronize directory changes to the disk during transaction commit.

If this flag is set to false, directory changes (create/delete children) done inside a transaction may not get synchronized to the disk at commit.

Default value is true.

Parameters:
synchronizeDirectoryChanges - new value of synchronizeDirectoryChanges.
Since:
1.1

getClusterMasterAddress

public String getClusterMasterAddress()
Returns the value of clusterMasterAddress.

See the description for getEnableClusterMode().

There is no default value.

Returns:
value of clusterMasterAddress.
Since:
1.2

setClusterMasterAddress

public void setClusterMasterAddress(String clusterMasterAddress)
Sets the value of clusterMasterAddress.

See the description for getEnableClusterMode().

There is no default value.

Parameters:
clusterMasterAddress - new value of clusterMasterAddress.
Since:
1.2

getClusterMasterPort

public Integer getClusterMasterPort()
Returns the value of clusterMasterPort.

See the description for getEnableClusterMode().

There is no default value.

Returns:
value of clusterMasterPort.
Since:
1.2

setClusterMasterPort

public void setClusterMasterPort(Integer clusterMasterPort)
Sets the value of clusterMasterPort.

See the description for getEnableClusterMode().

There is no default value.

Parameters:
clusterMasterPort - new value of clusterMasterPort.
Since:
1.2

getEnableClusterMode

public Boolean getEnableClusterMode()
Returns the value of enableClusterMode.

An XADisk cluster consists of a set of XADisk instances with exactly one of them being the master instance. To enable XADisk clustering, the following configuration is required:

  1. enableClusterMode flag must be set to true for all instances in the cluster.
  2. serverAddress/serverPort must be set for the master instance.
  3. clusterMasterAddress/clusterMasterPort must not be set for the master instance. For all other instances in the cluster these values must be set as the values of serverAddress/serverPort configured in the master instance.
  4. (Optional) For instances running in the same JVM as the master instance, clusterMasterAddress can optionally be set to "#masterInstanceId".

Default value is false.

Returns:
value of enableClusterMode.
Since:
1.2

setEnableClusterMode

public void setEnableClusterMode(Boolean enableClusterMode)
Sets the value of enableClusterMode.

An XADisk cluster consists of a set of XADisk instances with exactly one of them being the master instance. To enable XADisk clustering, the following configuration is required:

  1. enableClusterMode flag must be set to true for all instances in the cluster.
  2. serverAddress/serverPort must be set for the master instance.
  3. clusterMasterAddress/clusterMasterPort must not be set for the master instance. For all other instances in the cluster these values must be set as the values of serverAddress/serverPort configured in the master instance.
  4. (Optional) For instances running in the same JVM as the master instance, clusterMasterAddress can optionally be set to "#masterInstanceId".

Default value is false.

Parameters:
enableClusterMode - new value of enableClusterMode.
Since:
1.2

XADisk 1.2
xadisk.java.net

Copyright © 2010-2011, Nitin Verma (project owner for XADisk). All rights reserved.
Use is subject to terms of license Eclipse Public License 1.0 located at http://www.opensource.org/licenses/eclipse-1.0.php.