|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ProgrammaticRefFactory
Using the ProgrammaticRefFactory it is possible to get access to the 'manual' instrumented reference: ProgrammaticRef. 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 | ||
|---|---|---|
ProgrammaticLongRef |
atomicCreateLongRef(long value)
Atomically creates a new ProgrammaticLongRef. |
|
|
atomicCreateRef()
Creates a new ProgrammaticRef with a null value atomically. |
|
|
atomicCreateRef(E value)
Creates a new ProgrammaticRef atomically. |
|
ProgrammaticLongRef |
createLongRef(long value)
Creates a new ProgrammaticLongRef. |
|
ProgrammaticLongRef |
createLongRef(Transaction tx,
long value)
Creates a new ProgrammaticLongRef that is created in the context of the provided transaction. |
|
|
createRef(E value)
Creates a new ProgrammaticRef with the provided value. |
|
|
createRef(Transaction tx,
E value)
Creates a new ProgrammaticRef with the provided value and lifting on the provided transaction. |
|
| Method Detail |
|---|
ProgrammaticLongRef createLongRef(long value)
UncommittedReadConflict.
value - the initial value of the ProgrammaticLongRef.
ControlFlowError
ProgrammaticLongRef createLongRef(Transaction tx,
long value)
tx - the transaction to use for creating this ProgrammaticLongRef.value - the initial value of the ProgrammaticLongRef.
java.lang.NullPointerException - if tx is null.
IllegalTransactionStateException - if the transaction is
not in the correct state for this operation.ProgrammaticLongRef atomicCreateLongRef(long value)
value - the value stored in the ProgrammaticLongRef.
<E> ProgrammaticRef<E> createRef(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> ProgrammaticRef<E> createRef(Transaction tx,
E value)
UncommittedReadConflict.
E - the type of the value stored in the referencetx - the Transaction used to createReference the ProgrammaticRef.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> ProgrammaticRef<E> atomicCreateRef(E value)
ThreadLocalTransaction.
This is the cheapest call for making a ProgrammaticRef, 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> ProgrammaticRef<E> atomicCreateRef()
ThreadLocalTransaction.
This is the cheapest call for making a ProgrammaticRef, 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 | |||||||||