public class TransInteger extends TransactionalComponentLifecycle<org.apache.jena.dboe.transaction.TransInteger.IntegerState>
TransactionalComponentLifecycle.ComponentState<X>| Constructor and Description |
|---|
TransInteger()
In-memory, non persistent, transactional integer
|
TransInteger(long v)
In-memory, non persistent, transactional integer
|
TransInteger(long v,
ComponentId componentId)
In-memory, non persistent, transactional integer
|
TransInteger(String filename,
ComponentId cid)
Persistent, transactional integer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanStart()
Indicate that no recovery is being done (the journal thinks everything was completed last time)
|
void |
finishRecovery()
End of the recovery phase
|
long |
get()
Return the current value.
|
void |
inc()
Set the value, return the old value
|
long |
read()
Return the current value in a transaction.
|
void |
recover(ByteBuffer ref)
Notification that
ref was really committed and is being recovered. |
long |
set(long x)
Set the value, return the old value
|
void |
startRecovery() |
String |
toString() |
long |
value()
Read the current global state (that is, the last committed value) outside a transaction.
|
abort, attach, begin, commit, commitEnd, commitPrepare, complete, detach, getComponentId, getComponentState, promote, setComponentState, shutdownpublic TransInteger()
public TransInteger(long v)
public TransInteger(long v,
ComponentId componentId)
public TransInteger(String filename, ComponentId cid)
filename - Persistent statecid - Component idpublic void startRecovery()
startRecovery in interface TransactionalComponentstartRecovery in class TransactionalComponentLifecycle<org.apache.jena.dboe.transaction.TransInteger.IntegerState>public void recover(ByteBuffer ref)
TransactionalComponentref was really committed and is being recovered.recover in interface TransactionalComponentrecover in class TransactionalComponentLifecycle<org.apache.jena.dboe.transaction.TransInteger.IntegerState>ref - Same bytes as were written during prepare originally.public void finishRecovery()
TransactionalComponentfinishRecovery in interface TransactionalComponentfinishRecovery in class TransactionalComponentLifecycle<org.apache.jena.dboe.transaction.TransInteger.IntegerState>public void cleanStart()
TransactionalComponentpublic void inc()
public long set(long x)
public long read()
public long get()
TransInteger state is atomic).public long value()
Licensed under the Apache License, Version 2.0