Class InterestPolicy
- All Implemented Interfaces:
Serializable
- Since:
- GemFire 5.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final InterestPolicyThis subscriber is interested in all data.static final InterestPolicyThis subscriber is interested in data that is already in its cache.static final InterestPolicyThe interest policy used by default; it isCACHE_CONTENT.final byteused as ordinal to represent this InterestPolicy -
Method Summary
Modifier and TypeMethodDescriptionstatic InterestPolicyfromOrdinal(byte ordinal) Return the InterestPolicy represented by specified ordinalbooleanisAll()Return true if this policy isALL.booleanReturn true if this policy isCACHE_CONTENT.booleanReturn true if this policy is the default.toString()Returns a string representation for this interest policy.
-
Field Details
-
ALL
This subscriber is interested in all data. More specifically operations done in this cache and distributed operations done in remote caches.When combined with
DataPolicy.EMPTYthis region will receive events for every distributed operation but will not store the data.When combined with
DataPolicy.NORMALorDataPolicy.PRELOADEDthis region will acceptRegion.create(Object, Object)operations done remotely. Without theALLinterest policy,NORMALandPRELOADEDignorecreatesthat the region does not have an existing entry for.When combined with the
replication policiesthis interest has no effect.When combined with
DataPolicy.PARTITIONthis interest policy causes cache listeners to be notified of changes regardless of the physical location of the data affected. That is, a listener in a VM using this policy will receive notification of all changes to the partitioned region. -
CACHE_CONTENT
This subscriber is interested in data that is already in its cache. More specifically operations done in this cache and distributed operations done in remote caches.When combined with
DataPolicy.EMPTYthis region will never receive events for distributed operations since its content is always empty. It will continue to get events for operations done locally.When combined with
DataPolicy.NORMALorDataPolicy.PRELOADEDthis region will accept remote operations done to entries it already has in its cache.When combined with the
replication policies* this interest has no effect.When combined with
DataPolicy.PARTITIONthis interest policy causes cache listeners to be notified in the VM holding the affected data. That is, listeners are only notified if the affected* key-value pair is in the same process as the listener. -
DEFAULT
The interest policy used by default; it isCACHE_CONTENT. -
ordinal
public final byte ordinalused as ordinal to represent this InterestPolicy
-
-
Method Details
-
fromOrdinal
Return the InterestPolicy represented by specified ordinal- Parameters:
ordinal- the ordinal representation of an InterestPolicy- Returns:
- the InterestPolicy represented by specified ordinal
-
isAll
public boolean isAll()Return true if this policy isALL.- Returns:
- true if this policy is
ALL.
-
isCacheContent
public boolean isCacheContent()Return true if this policy isCACHE_CONTENT.- Returns:
- true if this policy is
CACHE_CONTENT.
-
isDefault
public boolean isDefault()Return true if this policy is the default.- Returns:
- true if this policy is the default.
-
toString
Returns a string representation for this interest policy.
-