jdbm

## Interface ActionRecordManager

All Superinterfaces:
  RecordManager

All Known Implementing Classes:
  SnapshotRecordManager

    public interface ActionRecordManager
    extends RecordManager

Extends the RecordManager to allow callers to group their RecordManager interface calls into actions. Actions operate in isolation. Each thread has a current action context associated with it. Threads can switch between different action context using set/unsetActionContext calls.

Author:
  Apache Directory Project

### Field Summary

### Fields inherited from interface jdbm.RecordManager

`NAME_DIRECTORY_ROOT`

### Method Summary

Methods
`void` `abortAction(ActionContext context)` Aborts the given action.
`ActionContext` `beginAction(boolean readOnly, String whoStarted)` Initializes the context for the action.
`void` `endAction(ActionContext context)` Ends the action associated with the context.
`void` `setCurrentActionContext(ActionContext context)` Set the context as the current action context for the given thread
`void` `unsetCurrentActionContext(ActionContext context)` Unsets the context as the current action context.

### Methods inherited from interface jdbm.RecordManager

`close, commit, delete, fetch, fetch, getNamedObject, getRoot, getRootCount, insert, insert, rollback, setNamedObject, setRoot, update, update`

### Method Detail

#### beginAction

    ActionContext beginAction(boolean readOnly,
                            String whoStarted)

Initializes the context for the action. Implicity sets the context as the current action.

Parameters:
  `readOnly` - true if action does not do any modification
  `whoStarted` - caller can use this for debugging
Returns:
  The created action context

#### endAction

    void endAction(ActionContext context)

Ends the action associated with the context. ReadWrite actions' changes are made visible to readers.

Parameters:
  `context` - identifies the action to end

#### abortAction

    void abortAction(ActionContext context)

Aborts the given action. For write actions, actions's changes should not be made visible to readers.

Parameters:
  `context` - identifies the action to abort

#### setCurrentActionContext

    void setCurrentActionContext(ActionContext context)

Set the context as the current action context for the given thread

Parameters:
  `context` - identifies the context

#### unsetCurrentActionContext

    void unsetCurrentActionContext(ActionContext context)

Unsets the context as the current action context. Given context should be current action context for the calling thread.

Parameters:
  `context` - identifies the context.