org.apache.geode.cache

## Class Scope

- java.lang.Object
- - org.apache.geode.cache.Scope

- All Implemented Interfaces:
    java.io.Serializable

      public class Scope
      extends java.lang.Object
      implements java.io.Serializable

  Enumerated type for region distribution scope.
  Since:
    GemFire 3.0
  See Also:
    `RegionAttributes.getScope()`, `AttributesFactory.setScope(org.apache.geode.cache.Scope)`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Scope` | `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.
    `static Scope` | `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.
    `static Scope` | `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.
    `static Scope` | `LOCAL` The region with this attribute is scoped to this JVM only.
    `int` | `ordinal` int used as ordinal to represent this Scope

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Scope` | `fromOrdinal(int ordinal)` Return the Scope represented by specified ordinal
    `static Scope` | `fromString(java.lang.String scope)` Parse the given string into a Scope
    `boolean` | `isAck()` Returns whether acknowledgements are required for this scope.
    `boolean` | `isDistributed()` Returns whether this is one of the distributed scopes.
    `boolean` | `isDistributedAck()` Returns whether this is distributed ack scope.
    `boolean` | `isDistributedNoAck()` Returns whether this is distributed no ack scope.
    `boolean` | `isGlobal()` Returns whether this is global scope.
    `boolean` | `isLocal()` Returns whether this is local scope.
    `java.lang.String` | `toString()` Returns a string representation for this scope.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### LOCAL

          public static final Scope LOCAL

      The region with this attribute is scoped to this JVM only. Operations and data are not distributed to other caches.

    - #### DISTRIBUTED_NO_ACK

          public static final Scope 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

          public static final Scope 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

          public static final Scope 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

      int used as ordinal to represent this Scope

  - ### Method Detail

    - #### fromOrdinal

          public static Scope fromOrdinal(int ordinal)

      Return 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

          public java.lang.String toString()

      Returns a string representation for this scope.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        String the name of this scope

    - #### fromString

          public static Scope fromString(java.lang.String scope)

      Parse the given string into a Scope
      Parameters:
        `scope` - the provided String form of Scope
      Returns:
        the canonical Scope associated with the string