| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final List | |
| private static final Logger | |
| private boolean | |
| private final Map | |
| private final Map | |
| private final TransactionID | |
| private final TransactionIDFactory |
| Access | Constructor and Description |
|---|---|
| public | LocalTransactionContext(int
the timeout before the context expires transactionTimeout, TransactionIDFactory the transaction ID factory to retrieve a new transaction id from transactionIdFactory)Create a new LocalTransactionContext |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | commit(boolean
true if commit should proceed no matter the timeout ignoreTimeout)Commit all work done in the context and release all registered soft locks |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| private void | |
| private void | |
| private void | |
| private void | |
| public List | Returns: a List of registered soft locks for this cachethe name of the cache cacheName)Get all soft locks registered in this context for a specific cache |
| public TransactionID | |
| public int | |
| public boolean | Returns: true if at least one soft lock got registered, false otherwiseCheck if anything was locked in this transaction's context |
| public void | registerSoftLock(String
the name of the cache this soft lock is in cacheName, LocalTransactionStore the LocalTransactionStore this soft lock is in store, SoftLock the soft lock softLock)Register a soft lock in the context |
| public void | |
| public void | |
| public long | Returns: the time in milliseconds after which this context will expireGet the time until this context will expire |
| public boolean | |
| private void | |
| public void | updateSoftLock(String
the name of the cache this soft lock is in cacheName, SoftLock the soft lock softLock)Update a soft lock already registered in the context |
| expirationTimestamp | back to summary |
|---|---|
| private final long expirationTimestamp | |
| listeners | back to summary |
|---|---|
| private final List<TransactionListener> listeners | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| rollbackOnly | back to summary |
|---|---|
| private boolean rollbackOnly | |
| softLockMap | back to summary |
|---|---|
| private final Map<String, List<SoftLock>> softLockMap | |
| storeMap | back to summary |
|---|---|
| private final Map<String, LocalTransactionStore> storeMap | |
| transactionId | back to summary |
|---|---|
| private final TransactionID transactionId | |
| transactionIdFactory | back to summary |
|---|---|
| private final TransactionIDFactory transactionIdFactory | |
| LocalTransactionContext | back to summary |
|---|---|
| public LocalTransactionContext(int transactionTimeout, TransactionIDFactory transactionIdFactory) Create a new LocalTransactionContext
| |
| addListener | back to summary |
|---|---|
| public void addListener(TransactionListener listener) Add a TransactionListener to this context
| |
| commit | back to summary |
|---|---|
| public void commit(boolean ignoreTimeout) Commit all work done in the context and release all registered soft locks
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| fireAfterCommitEvent | back to summary |
|---|---|
| private void fireAfterCommitEvent() | |
| fireAfterRollbackEvent | back to summary |
|---|---|
| private void fireAfterRollbackEvent() | |
| fireBeforeCommitEvent | back to summary |
|---|---|
| private void fireBeforeCommitEvent() | |
| freeze | back to summary |
|---|---|
| private void freeze() | |
| getSoftLocksForCache | back to summary |
|---|---|
| public List Get all soft locks registered in this context for a specific cache | |
| getTransactionId | back to summary |
|---|---|
| public TransactionID getTransactionId() Get the transaction ID of the context
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hasLockedAnything | back to summary |
|---|---|
| public boolean hasLockedAnything() Check if anything was locked in this transaction's context
| |
| registerSoftLock | back to summary |
|---|---|
| public void registerSoftLock(String cacheName, LocalTransactionStore store, SoftLock softLock) Register a soft lock in the context
| |
| rollback | back to summary |
|---|---|
| public void rollback() Rollback all work done in the context and release all registered soft locks | |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() Mark the context for rollback | |
| timeBeforeTimeout | back to summary |
|---|---|
| public long timeBeforeTimeout() Get the time until this context will expire
| |
| timedOut | back to summary |
|---|---|
| public boolean timedOut() Check if the context timed out
| |
| unfreezeAndUnlock | back to summary |
|---|---|
| private void unfreezeAndUnlock() | |
| updateSoftLock | back to summary |
|---|---|
| public void updateSoftLock(String cacheName, SoftLock softLock) Update a soft lock already registered in the context | |