Package org.eclipse.emf.cdo.transaction
Interface CDOTransaction.Options
- All Superinterfaces:
CDOCommonView.Options,CDOView.Options,org.eclipse.net4j.util.event.INotifier,org.eclipse.net4j.util.options.IOptions
- Enclosing interface:
- CDOTransaction
Encapsulates a set of notifying
transaction configuration options.- Author:
- Simon McDuff
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfaceAnoptions eventfired from transactionoptionswhen theauto release locks enabledorauto release locks exemptionsoptions have changed.static interfacestatic interfacestatic interfaceAnoptions eventfired from transactionoptionswhen theoptimistic locking timeoutoption has changed.static interfaceAnoptions eventfired from transactionoptionswhen thestale reference cleaneroption has changed.static interfaceNested classes/interfaces inherited from interface org.eclipse.emf.cdo.common.CDOCommonView.Options
CDOCommonView.Options.LockNotificationEventNested classes/interfaces inherited from interface org.eclipse.emf.cdo.view.CDOView.Options
CDOView.Options.CacheReferenceTypeEvent, CDOView.Options.ChangeSubscriptionPoliciesEvent, CDOView.Options.ClearAdapterPolicyEvent, 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.StrongReferencePolicyEventNested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final longIndicates to use the timeout value that is configured on the server.static final CDOUndoDetectorstatic final longFields inherited from interface org.eclipse.emf.cdo.view.CDOView.Options
DEFAULT_REVISION_PREFETCHING, NO_REVISION_PREFETCHING -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAutoReleaseLocksExemptions(boolean recursive, EObject... objects) Adds the givenobjectto the set of objects that are to be treated as exemptions to theisAutoReleaseLocksEnabled()option.voidaddConflictResolver(CDOConflictResolver resolver) Adds a conflict resolver to the list of conflict resolvers of this transaction.voidClears the set ofobjectsthat are to be treated as exemptions to theisAutoReleaseLocksEnabled()option.Returns a map which, if non-null, stores copies of the initialrevisionsof newly attached objects.Returns the set ofobjectsthat are to be treated as exemptions to theisAutoReleaseLocksEnabled()option.longReturns the number of milliseconds to wait for the transaction update whenCDOUserTransaction.commit()is called.Returns a copy of the conflict resolver list of this transaction.Returns thetransactionof this options object.longReturns the number of milliseconds to wait for the successful acquisition of all required implicit locks on the server whenCDOUserTransaction.commit()is called.Get theCDOStaleReferenceCleanerto be used to clean stale references when receiving remote changes on invalidation.Returns the undo detector of this transaction.booleanReturnstrueif locks in this transaction will be released whenCDOUserTransaction.commit()orCDOUserTransaction.rollback()are called,falseotherwise.booleanisAutoReleaseLocksExemption(EObject object) Returnstrueif the given object is treated as an exemption to theisAutoReleaseLocksEnabled()option,falseotherwise.voidremoveAutoReleaseLocksExemptions(boolean recursive, EObject... objects) Removes the givenobjectfrom the set of objects that are to be treated as exemptions to theisAutoReleaseLocksEnabled()option.voidremoveConflictResolver(CDOConflictResolver resolver) Removes a conflict resolver from the list of conflict resolvers of this transaction.voidsetAttachedRevisionsMap(Map<CDOID, CDORevision> attachedRevisionsMap) Sets a map which, if non-null, stores copies of the initialrevisionsof newly attached objects, so that these objects can and will be rolled back to the model values they had at attachment time.voidsetAutoReleaseLocksEnabled(boolean on) Specifies whether locks in this transaction will be released whenCDOUserTransaction.commit()orCDOUserTransaction.rollback()are called.voidsetCommitInfoTimeout(long commitInfoTimeout) Specifies the number of milliseconds to wait for the transaction update whenCDOUserTransaction.commit()is called.voidsetConflictResolvers(CDOConflictResolver[] resolvers) Sets the conflict resolver list of this transaction.voidsetOptimisticLockingTimeout(long optimisticLockingTimeout) Returns the number of milliseconds to wait for the successful acquisition of all required implicit locks on the server whenCDOUserTransaction.commit()is called.voidsetStaleReferenceCleaner(CDOStaleReferenceCleaner staleReferenceCleaner) Set theCDOStaleReferenceCleanerto be used to clean stale references when receiving remote changes on invalidation.voidsetUndoDetector(CDOUndoDetector undoDetector) Sets the undo detector of this transaction.Methods inherited from interface org.eclipse.emf.cdo.common.CDOCommonView.Options
isLockNotificationEnabled, setLockNotificationEnabledMethods inherited from interface org.eclipse.emf.cdo.view.CDOView.Options
addChangeSubscriptionPolicy, getCacheReferenceType, getChangeSubscriptionPolicies, getClearAdapterPolicy, getFeatureAnalyzer, getInvalidationPolicy, getRevisionPrefetchingPolicy, getStaleReferenceBehaviour, getStaleReferencePolicy, getStrongReferencePolicy, isDetachmentNotificationEnabled, isInvalidationNotificationEnabled, isLoadNotificationEnabled, removeChangeSubscriptionPolicy, setCacheReferenceType, setClearAdapterPolicy, setDetachmentNotificationEnabled, setFeatureAnalyzer, setInvalidationNotificationEnabled, setInvalidationPolicy, setLoadNotificationEnabled, setRevisionPrefetchingPolicy, setStaleReferenceBehaviour, setStaleReferencePolicy, setStrongReferencePolicyMethods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Field Details
-
DEFAULT_UNDO_DETECTOR
- Since:
- 4.3
-
DEFAULT_COMMIT_INFO_TIMEOUT
static final long DEFAULT_COMMIT_INFO_TIMEOUT- Since:
- 4.5
- See Also:
-
DEFAULT_OPTIMISTIC_LOCKING_TIMEOUT
static final long DEFAULT_OPTIMISTIC_LOCKING_TIMEOUTIndicates to use the timeout value that is configured on the server.- Since:
- 4.15
- See Also:
-
NO_OPTIMISTIC_LOCKING_TIMEOUT
static final long NO_OPTIMISTIC_LOCKING_TIMEOUT- Since:
- 4.15
- See Also:
-
-
Method Details
-
getContainer
CDOTransaction getContainer()Returns thetransactionof this options object.- Specified by:
getContainerin interfaceCDOView.Options- Specified by:
getContainerin interfaceorg.eclipse.net4j.util.options.IOptions- Since:
- 4.0
-
getUndoDetector
CDOUndoDetector getUndoDetector()Returns the undo detector of this transaction.- Since:
- 4.3
-
setUndoDetector
Sets the undo detector of this transaction.- Since:
- 4.3
-
getConflictResolvers
CDOConflictResolver[] getConflictResolvers()Returns a copy of the conflict resolver list of this transaction. -
setConflictResolvers
Sets the conflict resolver list of this transaction. -
addConflictResolver
Adds a conflict resolver to the list of conflict resolvers of this transaction. -
removeConflictResolver
Removes a conflict resolver from the list of conflict resolvers of this transaction. -
getStaleReferenceCleaner
CDOStaleReferenceCleaner getStaleReferenceCleaner()Get theCDOStaleReferenceCleanerto be used to clean stale references when receiving remote changes on invalidation.- Since:
- 4.4
-
setStaleReferenceCleaner
Set theCDOStaleReferenceCleanerto be used to clean stale references when receiving remote changes on invalidation.- Since:
- 4.4
-
isAutoReleaseLocksEnabled
boolean isAutoReleaseLocksEnabled()Returnstrueif locks in this transaction will be released whenCDOUserTransaction.commit()orCDOUserTransaction.rollback()are called,falseotherwise.The default value is
true.- See Also:
-
setAutoReleaseLocksEnabled
void setAutoReleaseLocksEnabled(boolean on) Specifies whether locks in this transaction will be released whenCDOUserTransaction.commit()orCDOUserTransaction.rollback()are called.If set to
falseall locks will be kept whenCDOUserTransaction.commit()orCDOUserTransaction.rollback()are called.The default value is
true.- See Also:
-
getAutoReleaseLocksExemptions
Returns the set ofobjectsthat are to be treated as exemptions to theisAutoReleaseLocksEnabled()option.That means:
- If
isAutoReleaseLocksEnabled()returnstrue, the locks on the objects in this set are not released whenCDOUserTransaction.commit()orCDOUserTransaction.rollback()are called. - If
isAutoReleaseLocksEnabled()returnsfalse, the locks on the objects in this set are released nevertheless whenCDOUserTransaction.commit()orCDOUserTransaction.rollback()are called.
The returned set is unmodifiable. To modify the set use the
clearAutoReleaseLocksExemptions(),addAutoReleaseLocksExemption(), andremoveAutoReleaseLocksExemption()methods.Implementation note: This set stores weak references to the contained objects.
- If
-
isAutoReleaseLocksExemption
Returnstrueif the given object is treated as an exemption to theisAutoReleaseLocksEnabled()option,falseotherwise.- Since:
- 4.6
- See Also:
-
clearAutoReleaseLocksExemptions
void clearAutoReleaseLocksExemptions()Clears the set ofobjectsthat are to be treated as exemptions to theisAutoReleaseLocksEnabled()option. -
addAutoReleaseLocksExemptions
Adds the givenobjectto the set of objects that are to be treated as exemptions to theisAutoReleaseLocksEnabled()option. -
removeAutoReleaseLocksExemptions
Removes the givenobjectfrom the set of objects that are to be treated as exemptions to theisAutoReleaseLocksEnabled()option. -
getAttachedRevisionsMap
Map<CDOID,CDORevision> getAttachedRevisionsMap()Returns a map which, if non-null, stores copies of the initialrevisionsof newly attached objects.- Since:
- 4.8
- See Also:
-
setAttachedRevisionsMap
Sets a map which, if non-null, stores copies of the initialrevisionsof newly attached objects, so that these objects can and will be rolled back to the model values they had at attachment time. If this map isnullnewly attached objects will keep the model values they have at rollback time. Note that remembering copies of all newly attached objects can impose resource problems when many objects are attached, e.g., during larger imports.- Since:
- 4.8
-
getOptimisticLockingTimeout
long getOptimisticLockingTimeout()Returns the number of milliseconds to wait for the successful acquisition of all required implicit locks on the server whenCDOUserTransaction.commit()is called.Default value is
DEFAULT_OPTIMISTIC_LOCKING_TIMEOUT.- Since:
- 4.15
-
setOptimisticLockingTimeout
void setOptimisticLockingTimeout(long optimisticLockingTimeout) Returns the number of milliseconds to wait for the successful acquisition of all required implicit locks on the server whenCDOUserTransaction.commit()is called.Default value is
DEFAULT_OPTIMISTIC_LOCKING_TIMEOUT.- Since:
- 4.15
-
getCommitInfoTimeout
long getCommitInfoTimeout()Returns the number of milliseconds to wait for the transaction update whenCDOUserTransaction.commit()is called.Default value is 10000.
- Since:
- 4.5
-
setCommitInfoTimeout
void setCommitInfoTimeout(long commitInfoTimeout) Specifies the number of milliseconds to wait for the transaction update whenCDOUserTransaction.commit()is called.Default value is 10000.
- Since:
- 4.5
-