Schnittstelle CDOView.Options
- Alle Superschnittstellen:
CDOCommonView.Options
,org.eclipse.net4j.util.event.INotifier
,org.eclipse.net4j.util.options.IOptions
- Alle bekannten Unterschnittstellen:
CDOTransaction.Options
- Umschließende Schnittstelle:
CDOView
view
configuration options.- Autor:
- 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.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypSchnittstelleBeschreibungstatic interface
static interface
static interface
static interface
Anoptions event
fired from viewoptions
when thedetachment notification enabled
option has changed.static interface
static interface
Anoptions event
fired from viewoptions
when theinvalidation notification enabled
option has changed.static interface
static interface
static interface
Veraltet.static interface
static interface
static interface
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.emf.cdo.common.CDOCommonView.Options
CDOCommonView.Options.LockNotificationEvent
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final int
static final int
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Adds a change subscription policy to this view.org.eclipse.net4j.util.ref.ReferenceType
Returns the reference type to be used in the internal object cache.Returns the current set ofchange subscription policies
.The returned adapter policy may optionally implementCDOListWrapper
, seeCDOObjectImpl.eAdapters()
.Returns theview
of this options object.Returns the CDORevisionPrefetchingPolicy in use.Veraltet.Returns the CDOStaleReferencePolicy in use.Returns the strong reference policy in use.boolean
boolean
boolean
void
Removes a change subscription policy from this view.boolean
setCacheReferenceType
(org.eclipse.net4j.util.ref.ReferenceType referenceType) Sets the reference type to be used in the internal object cache to eitherSTRONG
,SOFT
orWEAK
.void
void
setDetachmentNotificationEnabled
(boolean enabled) void
setFeatureAnalyzer
(CDOFeatureAnalyzer featureAnalyzer) void
setInvalidationNotificationEnabled
(boolean enabled) void
void
setLoadNotificationEnabled
(boolean enabled) void
setRevisionPrefetchingPolicy
(CDORevisionPrefetchingPolicy prefetchingPolicy) The CDORevisionPrefetchingPolicy feature of the CDOView allows CDO users to fetch many objects at a time.void
Veraltet.void
Sets a policy on how to deal with stale references.void
Sets the policy that determines what object/adapter pairs of thisview
are supposed to be protected against garbage collection.Von Schnittstelle geerbte Methoden org.eclipse.emf.cdo.common.CDOCommonView.Options
isLockNotificationEnabled, setLockNotificationEnabled
Von Schnittstelle geerbte Methoden org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Felddetails
-
DEFAULT_REVISION_PREFETCHING
static final int DEFAULT_REVISION_PREFETCHING- Seit:
- 3.0
- Siehe auch:
-
NO_REVISION_PREFETCHING
static final int NO_REVISION_PREFETCHING- Siehe auch:
-
-
Methodendetails
-
getContainer
CDOView getContainer()Returns theview
of this options object.- Angegeben von:
getContainer
in Schnittstelleorg.eclipse.net4j.util.options.IOptions
- Seit:
- 4.0
-
isLoadNotificationEnabled
boolean isLoadNotificationEnabled()Returnstrue
if theobjects
in this view will notify theiradapters
about the fact that they are loaded,false
otherwise.- Seit:
- 4.1
-
setLoadNotificationEnabled
void setLoadNotificationEnabled(boolean enabled) Specifies whether theobjects
in this view will notify theiradapters
about the fact that they are loaded or not.- Seit:
- 4.1
-
isDetachmentNotificationEnabled
boolean isDetachmentNotificationEnabled()Returnstrue
if theobjects
in this view will notify theiradapters
about the fact that they are detached (due to remote changes),false
otherwise.- Seit:
- 4.1
- Siehe auch:
-
setDetachmentNotificationEnabled
void setDetachmentNotificationEnabled(boolean enabled) Specifies whether theobjects
in this view will notify theiradapters
about the fact that they are detached (due to remote changes) or not.- Seit:
- 4.1
- Siehe auch:
-
isInvalidationNotificationEnabled
boolean isInvalidationNotificationEnabled()Returnstrue
if theobjects
in this view will notify theiradapters
about the fact that they are invalidated (due to remote changes),false
otherwise.- Siehe auch:
-
setInvalidationNotificationEnabled
void setInvalidationNotificationEnabled(boolean enabled) Specifies whether theobjects
in this view will notify theiradapters
about the fact that they are invalidated (due to remote changes) or not.- Siehe auch:
-
getInvalidationPolicy
CDOInvalidationPolicy getInvalidationPolicy()- Seit:
- 3.0
-
setInvalidationPolicy
- Seit:
- 3.0
-
getChangeSubscriptionPolicies
CDOAdapterPolicy[] getChangeSubscriptionPolicies()Returns the current set ofchange subscription policies
.- Gibt zurück:
- The current set of change subscription policies, never
null
. - Siehe auch:
-
addChangeSubscriptionPolicy
Adds a change subscription policy to this view.To activate a policy, you must do the following:
view.options().addChangeSubscriptionPolicy(CDOChangeSubscriptionPolicy.ALL);
To register an object, you must add an adapter to the object in which you are interested:
eObject.eAdapters().add(myAdapter);
By activating this feature, each object having at least one adapter that matches the current policy will be registered with the server and will be notified for each change occurring in the scope of any other transaction.
CDOAdapterPolicy.NONE
- Ignored.CDOAdapterPolicy.ALL
- Enabled for all adapters used.CDOAdapterPolicy.CDO
- Enabled only for adapters that implementCDOAdapter
.- Any other class that implements
CDOAdapterPolicy
will enable for whatever rules defined in that class.
If
myAdapter
in the above example matches the current policy,eObject
will be registered with the server and you will receive all changes from other transaction.When the policy is changed all objects in the cache will automatically be recalculated.
You can subscribe to temporary objects. Even if you cannot receive notifications from other
CDOTransaction
for these because they are only local to you, at commit time these objects will be registered automatically.- Siehe auch:
-
removeChangeSubscriptionPolicy
Removes a change subscription policy from this view.- Siehe auch:
-
getCacheReferenceType
org.eclipse.net4j.util.ref.ReferenceType getCacheReferenceType()Returns the reference type to be used in the internal object cache.- Gibt zurück:
- Either
STRONG
,SOFT
orWEAK
.
-
setCacheReferenceType
boolean setCacheReferenceType(org.eclipse.net4j.util.ref.ReferenceType referenceType) Sets the reference type to be used in the internal object cache to eitherSTRONG
,SOFT
orWEAK
. Ifnull
is passed the default reference typeSOFT
is set. If the given reference type does not differ from the one being currently set the new value is ignored andfalse
is returned. Otherwise existing object references are converted to the new type andtrue
is returned. -
getStrongReferencePolicy
CDOAdapterPolicy getStrongReferencePolicy()Returns the strong reference policy in use.- Siehe auch:
-
setStrongReferencePolicy
Sets the policy that determines what object/adapter pairs of thisview
are supposed to be protected against garbage collection.A view uses references of the type determined by
getCacheReferenceType()
to hold on to loaded objects. If this type is notSTRONG
and the application does not hold other strong references to an object then this object and possibly any adapters attached to this object are subject to garbage collection.To avoid automatic garbage collection while specific adapters are attached to an object this view calls the
CDOAdapterPolicy.isValid()
method for all adapters that are attached to this object. An extra strong reference to this object is maintained if any of these calls returntrue
.The following adapter policies can be used as strong reference policies:
CDOAdapterPolicy.NONE
- No adapter will prevent GC.CDOAdapterPolicy.ALL
- Any adapter prevent GC.CDOAdapterPolicy.CDO
- Only adapters that implementCDOAdapter
will prevent GC.- Any other class that implements
CDOAdapterPolicy
will prevent GC according to whatever rules defined in that class.
The default strong reference policy is
CDOAdapterPolicy.ALL
, preventing garbage collection for all adapted objects.- Siehe auch:
-
getStaleReferenceBehaviour
Veraltet.Returns the CDOStaleReferencePolicy in use.- Seit:
- 3.0
-
setStaleReferenceBehaviour
Veraltet.Sets a policy on how to deal with stale references.- Seit:
- 3.0
-
getStaleReferencePolicy
CDOStaleReferencePolicy getStaleReferencePolicy()Returns the CDOStaleReferencePolicy in use.- Seit:
- 4.1
-
setStaleReferencePolicy
Sets a policy on how to deal with stale references.- Seit:
- 4.1
-
getRevisionPrefetchingPolicy
CDORevisionPrefetchingPolicy getRevisionPrefetchingPolicy()Returns the CDORevisionPrefetchingPolicy in use. -
setRevisionPrefetchingPolicy
The CDORevisionPrefetchingPolicy feature of the CDOView allows CDO users to fetch many objects at a time.The difference between the CDOCollectionLoadingPolicy feature and the CDORevisionPrefetchingPolicy feature is subtle. The CDOCollectionLoadingPolicy feature determines how and when to fetch CDOIDs, while the CDORevisionPrefetchingPolicy feature determines how and when to resolve CDOIDs (i.e. fetch the target objects).
view.options().setRevisionPrefetchingPolicy (CDONet4jUtil.createRevisionPrefetchingPolicy(10));
The end-user could provide its own implementation of the CDORevisionPrefetchingPolicy interface.
-
getFeatureAnalyzer
CDOFeatureAnalyzer getFeatureAnalyzer()- Seit:
- 4.1
-
setFeatureAnalyzer
- Seit:
- 4.1
-
getClearAdapterPolicy
CDOAdapterPolicy getClearAdapterPolicy()The returned adapter policy may optionally implementCDOListWrapper
, seeCDOObjectImpl.eAdapters()
.- Seit:
- 4.12
-
setClearAdapterPolicy
- Seit:
- 4.12
-
CDOView.Options.StrongReferencePolicyEvent
instead.