|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ProgrammaticReferenceFactory
Using the ProgrammaticReferenceFactory it is possible to get access to the 'manual' instrumented reference: ProgrammaticReference. This reference can safely be used without relying on instrumentation. It also provides access to methods not available in the normal instrumented classes.
This functionality specially is added to integrate Multiverse in environments where you don't want to rely on instrumentation but just want to have a 'managed reference (for example if you want to integrate multiverse in a different language than Java). Methods are thread safe.
| Method Summary | ||
|---|---|---|
ProgrammaticLong |
atomicCreateLong(long value)
Atomically creates a new ProgrammaticLong. |
|
|
atomicCreateReference()
Creates a new ProgrammaticReference with a null value atomically. |
|
|
atomicCreateReference(E value)
Creates a new ProgrammaticReference atomically. |
|
ProgrammaticLong |
createLong(long value)
Creates a new ProgrammaticLong. |
|
ProgrammaticLong |
createLong(Transaction tx,
long value)
Creates a new ProgrammaticLong that is created in the context of the provided transaction. |
|
|
createReference(E value)
Creates a new ProgrammaticReference with the provided value. |
|
|
createReference(Transaction tx,
E value)
Creates a new ProgrammaticReference with the provided value and lifting on the provided transaction. |
|
| Method Detail |
|---|
ProgrammaticLong createLong(long value)
UncommittedReadConflict.
value - the initial value of the ProgrammaticLong.
ControlFlowError
ProgrammaticLong createLong(Transaction tx,
long value)
tx - the transaction to use for creating this ProgrammaticLong.value - the initial value of the ProgrammaticLong.
java.lang.NullPointerException - if tx is null.
IllegalTransactionStateException - if the transaction is
not in the correct state for this operation.ProgrammaticLong atomicCreateLong(long value)
value - the value stored in the ProgrammaticLong.
<E> ProgrammaticReference<E> createReference(E value)
UncommittedReadConflict.
E - the type of the value stored in the referencevalue - the value stored in the reference (is allowed to be null).
<E> ProgrammaticReference<E> createReference(Transaction tx,
E value)
UncommittedReadConflict.
E - the type of the value stored in the referencetx - the Transaction used to createReference the ProgrammaticReference.value - the value stored in the reference (is allowed to be null).
java.lang.NullPointerException - if t is null.
IllegalTransactionStateException - if t is not active.
ControlFlowError<E> ProgrammaticReference<E> atomicCreateReference(E value)
ThreadLocalTransaction.
This is the cheapest call for making a ProgrammaticReference, so in most cases
this is the one you want to use.
E - type of the valuevalue - the value stores in the reference (is allowed to be null).
<E> ProgrammaticReference<E> atomicCreateReference()
ThreadLocalTransaction.
This is the cheapest call for making a ProgrammaticReference, so in most cases
this is the one you want to use.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||