public class ActionVersioning
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ActionVersioning.Version |
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.locks.Lock |
listLock
Lock to protect the list
|
private ActionVersioning.Version |
nextVersion
Current write version
|
private java.util.concurrent.atomic.AtomicReference<ActionVersioning.Version> |
readReference
Current read version reference
|
private ExplicitList<ActionVersioning.Version> |
versions
List to put versions on
|
| Constructor and Description |
|---|
ActionVersioning() |
| Modifier and Type | Method and Description |
|---|---|
ActionVersioning.Version |
beginReadAction()
Returns a version that can be used by the read only action
|
ActionVersioning.Version |
beginWriteAction()
Returns back the new version to be used with the read/write action.
|
ActionVersioning.Version |
endReadAction(ActionVersioning.Version version)
Called when the read action with the given action is ended.
|
ActionVersioning.Version |
endWriteAction()
Called when the read/write action completes.
|
private ActionVersioning.Version nextVersion
private java.util.concurrent.atomic.AtomicReference<ActionVersioning.Version> readReference
private ExplicitList<ActionVersioning.Version> versions
private java.util.concurrent.locks.Lock listLock
public ActionVersioning.Version beginWriteAction()
public ActionVersioning.Version endWriteAction()
public ActionVersioning.Version beginReadAction()
public ActionVersioning.Version endReadAction(ActionVersioning.Version version)
version - version of the read only action