public static interface CDOTransaction.Options extends CDOView.Options
transaction
configuration options.Modifier and Type | Interface and Description |
---|---|
static interface |
CDOTransaction.Options.AutoReleaseLocksEvent
An
options event fired from transaction options when the
auto release locks enabled or
auto release locks exemptions options have changed. |
static interface |
CDOTransaction.Options.CommitInfoTimeout
|
static interface |
CDOTransaction.Options.ConflictResolversEvent
|
static interface |
CDOTransaction.Options.StaleReferenceCleanerEvent
An
options event fired from transaction options when the
stale reference cleaner option has changed. |
static interface |
CDOTransaction.Options.UndoDetectorEvent
|
CDOView.Options.CacheReferenceTypeEvent, CDOView.Options.ChangeSubscriptionPoliciesEvent, CDOView.Options.DetachmentNotificationEvent, CDOView.Options.FeatureAnalyzerEvent, CDOView.Options.InvalidationNotificationEvent, CDOView.Options.InvalidationPolicyEvent, CDOView.Options.LoadNotificationEvent, CDOView.Options.ReferencePolicyEvent, CDOView.Options.RevisionPrefetchingPolicyEvent, CDOView.Options.StaleReferencePolicyEvent, CDOView.Options.StrongReferencePolicyEvent
CDOCommonView.Options.LockNotificationEvent
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_COMMIT_INFO_TIMEOUT |
static CDOUndoDetector |
DEFAULT_UNDO_DETECTOR |
DEFAULT_REVISION_PREFETCHING, NO_REVISION_PREFETCHING
Modifier and Type | Method and Description |
---|---|
void |
addAutoReleaseLocksExemptions(boolean recursive,
EObject... objects)
Adds the given
object to the set of objects that are to be treated as exemptions to the isAutoReleaseLocksEnabled() option. |
void |
addConflictResolver(CDOConflictResolver resolver)
Adds a conflict resolver to the list of conflict resolvers of this transaction.
|
void |
clearAutoReleaseLocksExemptions()
Clears the set of
objects that are to be treated as exemptions to the isAutoReleaseLocksEnabled() option. |
Set<? extends EObject> |
getAutoReleaseLocksExemptions()
Returns the set of
objects that are to be treated as exemptions to the isAutoReleaseLocksEnabled() option. |
long |
getCommitInfoTimeout()
Returns the number of milliseconds to wait for the transaction update when
CDOUserTransaction.commit() is called. |
CDOConflictResolver[] |
getConflictResolvers()
Returns a copy of the conflict resolver list of this transaction.
|
CDOTransaction |
getContainer()
Returns the
transaction of this options object. |
CDOStaleReferenceCleaner |
getStaleReferenceCleaner()
Get the
CDOStaleReferenceCleaner to be used to clean stale references when receiving
remote changes on invalidation. |
CDOUndoDetector |
getUndoDetector()
Returns the undo detector of this transaction.
|
boolean |
isAutoReleaseLocksEnabled()
Returns
true if locks in this transaction will be released when CDOUserTransaction.commit() or
CDOUserTransaction.rollback() are called, false otherwise. |
boolean |
isAutoReleaseLocksExemption(EObject object)
Returns
true if the given object is treated as an exemption to the isAutoReleaseLocksEnabled() option,
false otherwise. |
void |
removeAutoReleaseLocksExemptions(boolean recursive,
EObject... objects)
Removes the given
object from the set of objects that are to be treated as exemptions to the isAutoReleaseLocksEnabled() option. |
void |
removeConflictResolver(CDOConflictResolver resolver)
Removes a conflict resolver from the list of conflict resolvers of this transaction.
|
void |
setAutoReleaseLocksEnabled(boolean on)
Specifies whether locks in this transaction will be released when
CDOUserTransaction.commit() or
CDOUserTransaction.rollback() are called. |
void |
setCommitInfoTimeout(long commitInfoTimeout)
Specifies the number of milliseconds to wait for the transaction update when
CDOUserTransaction.commit() is called. |
void |
setConflictResolvers(CDOConflictResolver[] resolvers)
Sets the conflict resolver list of this transaction.
|
void |
setStaleReferenceCleaner(CDOStaleReferenceCleaner staleReferenceCleaner)
Set the
CDOStaleReferenceCleaner to be used to clean stale references when receiving
remote changes on invalidation. |
void |
setUndoDetector(CDOUndoDetector undoDetector)
Sets the undo detector of this transaction.
|
addChangeSubscriptionPolicy, getCacheReferenceType, getChangeSubscriptionPolicies, getFeatureAnalyzer, getInvalidationPolicy, getRevisionPrefetchingPolicy, getStaleReferenceBehaviour, getStaleReferencePolicy, getStrongReferencePolicy, isDetachmentNotificationEnabled, isInvalidationNotificationEnabled, isLoadNotificationEnabled, removeChangeSubscriptionPolicy, setCacheReferenceType, setDetachmentNotificationEnabled, setFeatureAnalyzer, setInvalidationNotificationEnabled, setInvalidationPolicy, setLoadNotificationEnabled, setRevisionPrefetchingPolicy, setStaleReferenceBehaviour, setStaleReferencePolicy, setStrongReferencePolicy
isLockNotificationEnabled, setLockNotificationEnabled
addListener, getListeners, hasListeners, removeListener
static final CDOUndoDetector DEFAULT_UNDO_DETECTOR
static final long DEFAULT_COMMIT_INFO_TIMEOUT
CDOTransaction getContainer()
transaction
of this options object.getContainer
in interface CDOView.Options
getContainer
in interface IOptions
CDOUndoDetector getUndoDetector()
void setUndoDetector(CDOUndoDetector undoDetector)
CDOConflictResolver[] getConflictResolvers()
void setConflictResolvers(CDOConflictResolver[] resolvers)
void addConflictResolver(CDOConflictResolver resolver)
void removeConflictResolver(CDOConflictResolver resolver)
CDOStaleReferenceCleaner getStaleReferenceCleaner()
CDOStaleReferenceCleaner
to be used to clean stale references when receiving
remote changes on invalidation.void setStaleReferenceCleaner(CDOStaleReferenceCleaner staleReferenceCleaner)
CDOStaleReferenceCleaner
to be used to clean stale references when receiving
remote changes on invalidation.boolean isAutoReleaseLocksEnabled()
true
if locks in this transaction will be released when CDOUserTransaction.commit()
or
CDOUserTransaction.rollback()
are called, false
otherwise.
The default value is true
.
getAutoReleaseLocksExemptions()
void setAutoReleaseLocksEnabled(boolean on)
CDOUserTransaction.commit()
or
CDOUserTransaction.rollback()
are called.
If set to false
all locks will be kept when CDOUserTransaction.commit()
or
CDOUserTransaction.rollback()
are called.
The default value is true
.
getAutoReleaseLocksExemptions()
Set<? extends EObject> getAutoReleaseLocksExemptions()
objects
that are to be treated as exemptions to the isAutoReleaseLocksEnabled()
option.
That means:
isAutoReleaseLocksEnabled()
returns true
, the locks on the objects in this set are not released
when CDOUserTransaction.commit()
or CDOUserTransaction.rollback()
are called.
isAutoReleaseLocksEnabled()
returns false
, the locks on the objects in this set are released nevertheless
when CDOUserTransaction.commit()
or CDOUserTransaction.rollback()
are called.
The returned set is unmodifiable. To modify the set use the clearAutoReleaseLocksExemptions()
,
addAutoReleaseLocksExemption()
,
and removeAutoReleaseLocksExemption()
methods.
Implementation note: This set stores weak references to the contained objects.
boolean isAutoReleaseLocksExemption(EObject object)
true
if the given object is treated as an exemption to the isAutoReleaseLocksEnabled()
option,
false
otherwise.getAutoReleaseLocksExemptions()
void clearAutoReleaseLocksExemptions()
objects
that are to be treated as exemptions to the isAutoReleaseLocksEnabled()
option.void addAutoReleaseLocksExemptions(boolean recursive, EObject... objects)
object
to the set of objects that are to be treated as exemptions to the isAutoReleaseLocksEnabled()
option.void removeAutoReleaseLocksExemptions(boolean recursive, EObject... objects)
object
from the set of objects that are to be treated as exemptions to the isAutoReleaseLocksEnabled()
option.long getCommitInfoTimeout()
CDOUserTransaction.commit()
is called.
Default value is 10000.
void setCommitInfoTimeout(long commitInfoTimeout)
CDOUserTransaction.commit()
is called.
Default value is 10000.
Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html