Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 4.0.103
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.je.rep
Class InsufficientReplicasException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.lang.RuntimeException
                  com.sleepycat.je.DatabaseException
                      com.sleepycat.je.OperationFailureException
                          com.sleepycat.je.rep.InsufficientReplicasException

All Implemented Interfaces:
  Serializable

    public class InsufficientReplicasException

extends OperationFailureException

Thrown by `Environment.beginTransaction(com.sleepycat.je.Transaction, com.sleepycat.je.TransactionConfig)` and `Transaction.commit()` when these operations are initiated at a Master which is not in contact with a quorum of Replicas as determined by the `Durability.ReplicaAckPolicy` that is in effect for the operation.

See Also:
  Serialized Form

Constructor Summary
`InsufficientReplicasException(com.sleepycat.je.txn.Locker locker, Durability.ReplicaAckPolicy ackPolicy, int requiredAckCount, Set<String> availableReplicas)` Creates a Commit exception.

Method Summary
`Set<String>` | `getAvailableReplicas()` Returns the set of Replicas that were in contact with the master at the time of the commit operation.
`Durability.ReplicaAckPolicy` | `getCommitPolicy()` Returns the Replica ack policy that was in effect for the transaction.
`int` | `getRequiredNodeCount()` Returns the number of nodes that were required to be active in order to satisfy the Replica ack policy.

Methods inherited from class com.sleepycat.je.DatabaseException
`getMessage`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### InsufficientReplicasException

    public InsufficientReplicasException(com.sleepycat.je.txn.Locker locker,
                                         Durability.ReplicaAckPolicy ackPolicy,
                                         int requiredAckCount,
                                         Set<String> availableReplicas)

  Creates a Commit exception.

  Parameters:
    `ackPolicy` - the ack policy that could not be implemented
    `requiredAckCount` - the replica acks required to satisfy the policy
    `availableReplicas` - the set of available Replicas

Method Detail

### getCommitPolicy

    public Durability.ReplicaAckPolicy getCommitPolicy()

  Returns the Replica ack policy that was in effect for the transaction.

  Returns:
    the Replica ack policy

### getRequiredNodeCount

    public int getRequiredNodeCount()

  Returns the number of nodes that were required to be active in order to satisfy the Replica ack policy.

  Returns:
    the required number of nodes

### getAvailableReplicas

    public Set<String> getAvailableReplicas()

  Returns the set of Replicas that were in contact with the master at the time of the commit operation.

  Returns:
    a set of Replica node names

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 4.0.103
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004-2010 Oracle. All rights reserved.