Package org.apache.geode.cache
Class Scope
java.lang.Object
org.apache.geode.cache.Scope
- All Implemented Interfaces:
Serializable
Enumerated type for region distribution scope.
- Since:
- GemFire 3.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScopeThe region or cached object with this attribute is scoped to the distributed cached system; any distributed operation will not return until all the remote acknowledgments come back.static final ScopeThe region or cached object with this attribute is scoped to the distributed cached system; any distributed operation will return without waiting for the remote acknowledgment.static final ScopeThe region or cached object with this attribute is scoped to the distributed cached system; locking is used for all distributed operations on entries to guarantee consistency across the distributed caches.static final ScopeThe region with this attribute is scoped to this JVM only.final int -
Method Summary
Modifier and TypeMethodDescriptionstatic ScopefromOrdinal(int ordinal) Return the Scope represented by specified ordinalstatic ScopefromString(String scope) Parse the given string into a ScopebooleanisAck()Returns whether acknowledgements are required for this scope.booleanReturns whether this is one of the distributed scopes.booleanReturns whether this is distributed ack scope.booleanReturns whether this is distributed no ack scope.booleanisGlobal()Returns whether this is global scope.booleanisLocal()Returns whether this is local scope.toString()Returns a string representation for this scope.
-
Field Details
-
LOCAL
The region with this attribute is scoped to this JVM only. Operations and data are not distributed to other caches. -
DISTRIBUTED_NO_ACK
The region or cached object with this attribute is scoped to the distributed cached system; any distributed operation will return without waiting for the remote acknowledgment. -
DISTRIBUTED_ACK
The region or cached object with this attribute is scoped to the distributed cached system; any distributed operation will not return until all the remote acknowledgments come back. -
GLOBAL
The region or cached object with this attribute is scoped to the distributed cached system; locking is used for all distributed operations on entries to guarantee consistency across the distributed caches. -
ordinal
public final int ordinal
-
-
Method Details
-
fromOrdinal
Return the Scope represented by specified ordinal- Parameters:
ordinal- the ordinal representation of a Scope- Returns:
- the Scope represented by specified ordinal
-
isLocal
public boolean isLocal()Returns whether this is local scope.- Returns:
- true if this is LOCAL
-
isDistributed
public boolean isDistributed()Returns whether this is one of the distributed scopes.- Returns:
- true if this is any scope other than LOCAL
-
isDistributedNoAck
public boolean isDistributedNoAck()Returns whether this is distributed no ack scope.- Returns:
- true if this is DISTRIBUTED_NO_ACK
-
isDistributedAck
public boolean isDistributedAck()Returns whether this is distributed ack scope.- Returns:
- true if this is DISTRIBUTED_ACK
-
isGlobal
public boolean isGlobal()Returns whether this is global scope.- Returns:
- true if this is GLOBAL
-
isAck
public boolean isAck()Returns whether acknowledgements are required for this scope.- Returns:
- true if this is DISTRIBUTED_ACK or GLOBAL, false otherwise
-
toString
Returns a string representation for this scope. -
toConfigTypeString
-
fromString
Parse the given string into a Scope- Parameters:
scope- the provided String form of Scope- Returns:
- the canonical Scope associated with the string
-