Gemfire JavaDocs
Package org.apache.geode.cache
Class SubscriptionAttributes
- java.lang.Object
-
- org.apache.geode.cache.SubscriptionAttributes
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,DataSerializable
public class SubscriptionAttributes extends java.lang.Object implements DataSerializable, java.io.Externalizable
Configuration attributes for defining subscriber requirements and behavior for aRegion
.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 newSubscriptionAttributes
with the default configurationSubscriptionAttributes(InterestPolicy interestPolicy)
Creates a newSubscriptionAttributes
with the given interest policy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
void
fromData(java.io.DataInput in)
Reads the state of this object as primitive data from the givenDataInput
.InterestPolicy
getInterestPolicy()
Returns the interest policy of this subscriber.int
hashCode()
void
readExternal(java.io.ObjectInput in)
void
toData(java.io.DataOutput out)
Writes the state of this object as primitive data to the givenDataOutput
.java.lang.String
toString()
Returns a string representation of the object.void
writeExternal(java.io.ObjectOutput out)
-
-
-
Constructor Detail
-
SubscriptionAttributes
public SubscriptionAttributes()
Creates a newSubscriptionAttributes
with the default configuration
-
SubscriptionAttributes
public SubscriptionAttributes(InterestPolicy interestPolicy)
Creates a newSubscriptionAttributes
with the given interest policy.- Parameters:
interestPolicy
- the interest policy this subscriber will use
-
-
Method Detail
-
getInterestPolicy
public InterestPolicy getInterestPolicy()
Returns the interest policy of this subscriber.- Returns:
- the interest policy of this subscriber
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
Returns a string representation of the object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of the object
-
toData
public void toData(java.io.DataOutput out) throws java.io.IOException
Description copied from interface:DataSerializable
Writes the state of this object as primitive data to the givenDataOutput
.Since 5.7 it is possible for any method call to the specified
DataOutput
to throwGemFireRethrowable
. It should not be caught by user code. If it is it must be rethrown.- Specified by:
toData
in interfaceDataSerializable
- Parameters:
out
- theDataOutput
to write to- Throws:
java.io.IOException
- A problem occurs while writing toout
-
fromData
public void fromData(java.io.DataInput in) throws java.io.IOException, java.lang.ClassNotFoundException
Description copied from interface:DataSerializable
Reads the state of this object as primitive data from the givenDataInput
.- Specified by:
fromData
in interfaceDataSerializable
- Parameters:
in
- theDataInput
to read from- Throws:
java.io.IOException
- A problem occurs while reading fromin
java.lang.ClassNotFoundException
- A class could not be loaded while reading fromin
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-