SubscriptionAttributes (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.cache, class: SubscriptionAttributes

Package org.apache.geode.cache

# Class SubscriptionAttributes

java.lang.Object
org.apache.geode.cache.SubscriptionAttributes

All Implemented Interfaces:
  `Externalizable`, `Serializable`, `DataSerializable`

public class SubscriptionAttributes extends Object implements DataSerializable, Externalizable
Configuration attributes for defining subscriber requirements and behavior for a `Region`.

The `InterestPolicy` defines what remote operation's data/event are of interest to this cache's region.

Since:
  GemFire 5.0
See Also:
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.apache.geode.DataSerializable

  `DataSerializable.Replaceable`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SubscriptionAttributes()`
  Creates a new `SubscriptionAttributes` with the default configuration
  `SubscriptionAttributes(InterestPolicy interestPolicy)`
  Creates a new `SubscriptionAttributes` with the given interest policy.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object other)`
  `void`
  `fromData(DataInput in)`
  Reads the state of this object as primitive data from the given `DataInput`.
  `InterestPolicy`
  `getInterestPolicy()`
  Returns the interest policy of this subscriber.
  `int`
  `hashCode()`
  `void`
  `readExternal(ObjectInput in)`
  `void`
  `toData(DataOutput out)`
  Writes the state of this object as primitive data to the given `DataOutput`.
  `String`
  `toString()`
  Returns a string representation of the object.
  `void`
  `writeExternal(ObjectOutput out)`

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

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

- ## Constructor Details

  - ### SubscriptionAttributes

    public SubscriptionAttributes()
    Creates a new `SubscriptionAttributes` with the default configuration

  - ### SubscriptionAttributes

    public SubscriptionAttributes(InterestPolicy interestPolicy)
    Creates a new `SubscriptionAttributes` with the given interest policy.
    Parameters:
      `interestPolicy` - the interest policy this subscriber will use

- ## Method Details

  - ### getInterestPolicy

    public InterestPolicy getInterestPolicy()
    Returns the interest policy of this subscriber.
    Returns:
      the interest policy of this subscriber

  - ### equals

    public boolean equals(Object other)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Returns a string representation of the object.
    Overrides:
      `toString` in class `Object`
    Returns:
      a string representation of the object

  - ### toData

    public void toData(DataOutput out) throws IOException
    Description copied from interface: `DataSerializable`
    Writes the state of this object as primitive data to the given `DataOutput`.

    Since 5.7 it is possible for any method call to the specified `DataOutput` to throw `GemFireRethrowable`. It should not be caught by user code. If it is it must be rethrown.

    Specified by:
      `toData` in interface `DataSerializable`
    Parameters:
      `out` - the `DataOutput` to write to
    Throws:
      `IOException` - A problem occurs while writing to `out`

  - ### fromData

    public void fromData(DataInput in) throws IOException, ClassNotFoundException
    Description copied from interface: `DataSerializable`
    Reads the state of this object as primitive data from the given `DataInput`.
    Specified by:
      `fromData` in interface `DataSerializable`
    Parameters:
      `in` - the `DataInput` to read from
    Throws:
      `IOException` - A problem occurs while reading from `in`
      `ClassNotFoundException` - A class could not be loaded while reading from `in`

  - ### writeExternal

    public void writeExternal(ObjectOutput out) throws IOException
    Specified by:
      `writeExternal` in interface `Externalizable`
    Throws:
      `IOException`

  - ### readExternal

    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
    Specified by:
      `readExternal` in interface `Externalizable`
    Throws:
      `IOException`
      `ClassNotFoundException`