Interface CDOView.Options
- 
- All Superinterfaces:
- CDOCommonView.Options,- org.eclipse.net4j.util.event.INotifier,- org.eclipse.net4j.util.options.IOptions
 - All Known Subinterfaces:
- CDOTransaction.Options
 - Enclosing interface:
- CDOView
 
 public static interface CDOView.Options extends CDOCommonView.Options Encapsulates a set of notifyingviewconfiguration 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 classes/interfaces inherited from interface org.eclipse.emf.cdo.common.CDOCommonView.OptionsCDOCommonView.Options.LockNotificationEvent
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_REVISION_PREFETCHINGstatic intNO_REVISION_PREFETCHING
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddChangeSubscriptionPolicy(CDOAdapterPolicy policy)Adds a change subscription policy to this view.org.eclipse.net4j.util.ref.ReferenceTypegetCacheReferenceType()Returns the reference type to be used in the internal object cache.CDOAdapterPolicy[]getChangeSubscriptionPolicies()Returns the current set ofchange subscription policies.CDOAdapterPolicygetClearAdapterPolicy()CDOViewgetContainer()Returns theviewof this options object.CDOFeatureAnalyzergetFeatureAnalyzer()CDOInvalidationPolicygetInvalidationPolicy()CDORevisionPrefetchingPolicygetRevisionPrefetchingPolicy()Returns the CDORevisionPrefetchingPolicy in use.CDOStaleReferencePolicygetStaleReferenceBehaviour()Deprecated.CDOStaleReferencePolicygetStaleReferencePolicy()Returns the CDOStaleReferencePolicy in use.CDOAdapterPolicygetStrongReferencePolicy()Returns the strong reference policy in use.booleanisDetachmentNotificationEnabled()Returnstrueif theobjectsin this view will notify theiradaptersabout the fact that they are detached (due to remote changes),falseotherwise.booleanisInvalidationNotificationEnabled()Returnstrueif theobjectsin this view will notify theiradaptersabout the fact that they are invalidated (due to remote changes),falseotherwise.booleanisLoadNotificationEnabled()Returnstrueif theobjectsin this view will notify theiradaptersabout the fact that they are loaded,falseotherwise.voidremoveChangeSubscriptionPolicy(CDOAdapterPolicy policy)Removes a change subscription policy from this view.booleansetCacheReferenceType(org.eclipse.net4j.util.ref.ReferenceType referenceType)Sets the reference type to be used in the internal object cache to eitherSTRONG,SOFTorWEAK.voidsetClearAdapterPolicy(CDOAdapterPolicy policy)voidsetDetachmentNotificationEnabled(boolean enabled)Specifies whether theobjectsin this view will notify theiradaptersabout the fact that they are detached (due to remote changes) or not.voidsetFeatureAnalyzer(CDOFeatureAnalyzer featureAnalyzer)voidsetInvalidationNotificationEnabled(boolean enabled)Specifies whether theobjectsin this view will notify theiradaptersabout the fact that they are invalidated (due to remote changes) or not.voidsetInvalidationPolicy(CDOInvalidationPolicy policy)voidsetLoadNotificationEnabled(boolean enabled)Specifies whether theobjectsin this view will notify theiradaptersabout the fact that they are loaded or not.voidsetRevisionPrefetchingPolicy(CDORevisionPrefetchingPolicy prefetchingPolicy)The CDORevisionPrefetchingPolicy feature of the CDOView allows CDO users to fetch many objects at a time.voidsetStaleReferenceBehaviour(CDOStaleReferencePolicy policy)Deprecated.voidsetStaleReferencePolicy(CDOStaleReferencePolicy policy)Sets a policy on how to deal with stale references.voidsetStrongReferencePolicy(CDOAdapterPolicy policy)Sets the policy that determines what object/adapter pairs of thisvieware supposed to be protected against garbage collection.- 
Methods inherited from interface org.eclipse.emf.cdo.common.CDOCommonView.OptionsisLockNotificationEnabled, setLockNotificationEnabled
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_REVISION_PREFETCHINGstatic final int DEFAULT_REVISION_PREFETCHING - Since:
- 3.0
- See Also:
- Constant Field Values
 
 - 
NO_REVISION_PREFETCHINGstatic final int NO_REVISION_PREFETCHING - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getContainerCDOView getContainer() Returns theviewof this options object.- Specified by:
- getContainerin interface- org.eclipse.net4j.util.options.IOptions
- Since:
- 4.0
 
 - 
isLoadNotificationEnabledboolean isLoadNotificationEnabled() Returnstrueif theobjectsin this view will notify theiradaptersabout the fact that they are loaded,falseotherwise.- Since:
- 4.1
 
 - 
setLoadNotificationEnabledvoid setLoadNotificationEnabled(boolean enabled) Specifies whether theobjectsin this view will notify theiradaptersabout the fact that they are loaded or not.- Since:
- 4.1
 
 - 
isDetachmentNotificationEnabledboolean isDetachmentNotificationEnabled() Returnstrueif theobjectsin this view will notify theiradaptersabout the fact that they are detached (due to remote changes),falseotherwise.- Since:
- 4.1
- See Also:
- CDONotification.DETACH_OBJECT
 
 - 
setDetachmentNotificationEnabledvoid setDetachmentNotificationEnabled(boolean enabled) Specifies whether theobjectsin this view will notify theiradaptersabout the fact that they are detached (due to remote changes) or not.- Since:
- 4.1
- See Also:
- CDONotification.DETACH_OBJECT
 
 - 
isInvalidationNotificationEnabledboolean isInvalidationNotificationEnabled() Returnstrueif theobjectsin this view will notify theiradaptersabout the fact that they are invalidated (due to remote changes),falseotherwise.- See Also:
- CDOInvalidationNotification
 
 - 
setInvalidationNotificationEnabledvoid setInvalidationNotificationEnabled(boolean enabled) Specifies whether theobjectsin this view will notify theiradaptersabout the fact that they are invalidated (due to remote changes) or not.- See Also:
- CDOInvalidationNotification
 
 - 
getInvalidationPolicyCDOInvalidationPolicy getInvalidationPolicy() - Since:
- 3.0
 
 - 
setInvalidationPolicyvoid setInvalidationPolicy(CDOInvalidationPolicy policy) - Since:
- 3.0
 
 - 
getChangeSubscriptionPoliciesCDOAdapterPolicy[] getChangeSubscriptionPolicies() Returns the current set ofchange subscription policies.- Returns:
- The current set of change subscription policies, never null.
- See Also:
- addChangeSubscriptionPolicy(CDOAdapterPolicy)
 
 - 
addChangeSubscriptionPolicyvoid addChangeSubscriptionPolicy(CDOAdapterPolicy policy) 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 implement- CDOAdapter.
- Any other class that implements CDOAdapterPolicywill enable for whatever rules defined in that class.
 If myAdapterin the above example matches the current policy,eObjectwill 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 CDOTransactionfor these because they are only local to you, at commit time these objects will be registered automatically.
 - 
removeChangeSubscriptionPolicyvoid removeChangeSubscriptionPolicy(CDOAdapterPolicy policy) Removes a change subscription policy from this view.
 - 
getCacheReferenceTypeorg.eclipse.net4j.util.ref.ReferenceType getCacheReferenceType() Returns the reference type to be used in the internal object cache.- Returns:
- Either STRONG,SOFTorWEAK.
 
 - 
setCacheReferenceTypeboolean setCacheReferenceType(org.eclipse.net4j.util.ref.ReferenceType referenceType) Sets the reference type to be used in the internal object cache to eitherSTRONG,SOFTorWEAK. Ifnullis passed the default reference typeSOFTis set. If the given reference type does not differ from the one being currently set the new value is ignored andfalseis returned. Otherwise existing object references are converted to the new type andtrueis returned.
 - 
getStrongReferencePolicyCDOAdapterPolicy getStrongReferencePolicy() Returns the strong reference policy in use.
 - 
setStrongReferencePolicyvoid setStrongReferencePolicy(CDOAdapterPolicy policy) Sets the policy that determines what object/adapter pairs of thisvieware 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 notSTRONGand 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 implement- CDOAdapterwill prevent GC.
- Any other class that implements CDOAdapterPolicywill 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.- See Also:
- getStrongReferencePolicy()
 
 - 
getStaleReferenceBehaviour@Deprecated CDOStaleReferencePolicy getStaleReferenceBehaviour() Deprecated.Returns the CDOStaleReferencePolicy in use.- Since:
- 3.0
 
 - 
setStaleReferenceBehaviour@Deprecated void setStaleReferenceBehaviour(CDOStaleReferencePolicy policy) Deprecated.Sets a policy on how to deal with stale references.- Since:
- 3.0
 
 - 
getStaleReferencePolicyCDOStaleReferencePolicy getStaleReferencePolicy() Returns the CDOStaleReferencePolicy in use.- Since:
- 4.1
 
 - 
setStaleReferencePolicyvoid setStaleReferencePolicy(CDOStaleReferencePolicy policy) Sets a policy on how to deal with stale references.- Since:
- 4.1
 
 - 
getRevisionPrefetchingPolicyCDORevisionPrefetchingPolicy getRevisionPrefetchingPolicy() Returns the CDORevisionPrefetchingPolicy in use.
 - 
setRevisionPrefetchingPolicyvoid setRevisionPrefetchingPolicy(CDORevisionPrefetchingPolicy prefetchingPolicy) 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. 
 - 
getFeatureAnalyzerCDOFeatureAnalyzer getFeatureAnalyzer() - Since:
- 4.1
 
 - 
setFeatureAnalyzervoid setFeatureAnalyzer(CDOFeatureAnalyzer featureAnalyzer) - Since:
- 4.1
 
 - 
getClearAdapterPolicyCDOAdapterPolicy getClearAdapterPolicy() - Since:
- 4.12
 
 - 
setClearAdapterPolicyvoid setClearAdapterPolicy(CDOAdapterPolicy policy) - Since:
- 4.12
 
 
- 
 
-