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 InsufficientAcksException

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

All Implemented Interfaces:
  Serializable

    public class InsufficientAcksException

extends OperationFailureException

This exception is thrown at the time of a commit in a Master, if the Master could not obtain transaction commit acknowledgments from its Replicas in accordance with the `Durability.ReplicaAckPolicy` currently in effect. This exception will never be thrown when the ReplicaAckPolicy of NONE is in effect.

Note that a InsufficientAcksException does not indicate there was a failure to commit the transaction on the master. The transaction has in fact been successfully committed on the master at the time of the exception.

The application can handle the exception and use it to take some form of administrative action. For example, it may log messages to have the operations staff look into the health of the replicas or the network. Or it may decide to increase the durability of the transaction on the Master by ensuring that the changes are flushed to the operating system's buffers or to the disk itself.

The application may additionally choose to continue to create new transactions, which may succeed or fail depending on whether the underlying problems have been resolved.

See Also:
  `Durability`, Serialized Form

Method Summary
`int` | `acksPending()` It returns the number of Replicas that did not respond with an acknowledgment within the Replica commit timeout period.
`int` | `acksRequired()` It returns the number of acknowledgments required by the commit policy.
`int` | `ackTimeout()` Returns the acknowledgment timeout that was in effect at the time of the exception.
`String` | `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`

Method Detail

### getMessage

    public String getMessage()

  Overrides:
    `getMessage` in class `DatabaseException`
  See Also:
    `DatabaseException.getMessage()`

### acksPending

    public int acksPending()

  It returns the number of Replicas that did not respond with an acknowledgment within the Replica commit timeout period.

  Returns:
    the number of missing acknowledgments

### acksRequired

    public int acksRequired()

  It returns the number of acknowledgments required by the commit policy.

  Returns:
    the number of acknowledgments required

### ackTimeout

    public int ackTimeout()

  Returns the acknowledgment timeout that was in effect at the time of the exception.

  Returns:
    the acknowledgment timeout in milliseconds

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.