com.novell.service.nds
Interface NdsReplica


public interface NdsReplica

Defines variables and methods for replica operations.


Field Summary
static int REPLICATYPE_MASTER
          Master replica created when the partition is defined and used to perform partition operations.
static int REPLICATYPE_READONLY
          Read-only replica, which will not receive client updates and can only be updated from master or read-write replicas.
static int REPLICATYPE_SECONDARY
          Secondary or read/write replica, which is created for a specific partition receiving client updates.
static int SF_DO_IMMEDIATE
          Synchronization flag that sets the Action Flag to the On state causing the action to be performed immediately.
static int SF_SEND_ALL
          Synchronization flag for sending all replica updates at the time of the next scheduled synchronization.
static int SF_TRANSITION
          Synchronization flag that sets the Transition Action Flag to the ON state.
 
Method Summary
 void receiveUpdates()
          This replica receives updates from the master replica.
 void sendUpdates()
          This replica sends updates to all other replicas.
 void setReplicaType(int type)
          Sets the replica type for the partition.
 void syncReplica(int delay)
          Synchronizes replicas, restricted by the specified time delay.
 void syncReplica(java.lang.String destServer, int flags, int delay)
          Synchronizes replicas to the specified server, restricted by the specified flags and time delay.
 

Field Detail

REPLICATYPE_MASTER

public static final int REPLICATYPE_MASTER
Master replica created when the partition is defined and used to perform partition operations.

(REPLICATYPE_MASTER = 0)


REPLICATYPE_SECONDARY

public static final int REPLICATYPE_SECONDARY
Secondary or read/write replica, which is created for a specific partition receiving client updates.

(REPLICATYPE_SECONDARY = 1)


REPLICATYPE_READONLY

public static final int REPLICATYPE_READONLY
Read-only replica, which will not receive client updates and can only be updated from master or read-write replicas.

(REPLICATYPE_READONLY = 2)


SF_DO_IMMEDIATE

public static final int SF_DO_IMMEDIATE
Synchronization flag that sets the Action Flag to the On state causing the action to be performed immediately.

If the Action Flag is not set to ON the synchronization is queued to be performed after a delay of a specified number of seconds.

(SF_DO_IMMEDIATE = 1)


SF_TRANSITION

public static final int SF_TRANSITION
Synchronization flag that sets the Transition Action Flag to the ON state.

If the replica is in a New, Dying, or Transition On state, the request is ignored and SUCCESS is returned.

(SF_TRANSITION = 2)


SF_SEND_ALL

public static final int SF_SEND_ALL
Synchronization flag for sending all replica updates at the time of the next scheduled synchronization.

(SF_SEND_ALL = 4)

Method Detail

setReplicaType

public void setReplicaType(int type)
                    throws NdsPartitionOperationException
Sets the replica type for the partition.
Parameters:
type - Replica type defined as: REPLICATYPE_MASTER, REPLICATYPE_SECONDARY, or REPLICATYPE_READONLY.
Throws:
PartitionOperationException -  

syncReplica

public void syncReplica(java.lang.String destServer,
                        int flags,
                        int delay)
                 throws NdsPartitionOperationException
Synchronizes replicas to the specified server, restricted by the specified flags and time delay.

This syncReplica() method updates each replica of a partition after an addition, deletion, or modification to NDS by providing a wrapper for the NWDSSyncReplicaToServer function.

Parameters:
destServer - Server with which to synchronize the replica.
flags - Synchronization flags (SF_DO_IMMEDIATE, SF_ TRANSITION, SF_SEND_ALL).
delay - Time delay after which to start the synchronization process.
Throws:
PartitionOperationException - Naming Exception indicating that the operation failed.

syncReplica

public void syncReplica(int delay)
                 throws NdsPartitionOperationException
Synchronizes replicas, restricted by the specified time delay.

This syncReplica() method updates each replica of a partition after an addition, deletion, or modification to NDS by providing a wrapper for the NWDSSyncPartition function.

Parameters:
delay - Time delay after which to start the synchronization process.
Throws:
PartitionOperationException - Naming Exception indicating that the operation failed.

receiveUpdates

public void receiveUpdates()
                    throws com.novell.service.jncp.NSIException
This replica receives updates from the master replica.
Throws:
com.novell.service.jncp.NSIException -  

sendUpdates

public void sendUpdates()
                 throws com.novell.service.jncp.NSIException
This replica sends updates to all other replicas.
Throws:
com.novell.service.jncp.NSIException -