VMware GemFire Java API Reference
Class MembershipAttributes
- java.lang.Object
-
- org.apache.geode.cache.MembershipAttributes
-
- All Implemented Interfaces:
Externalizable,Serializable,DataSerializable
@Deprecated public class MembershipAttributes extends Object implements DataSerializable, Externalizable
Deprecated.this feature is scheduled to be removedConfiguration attributes for defining reliability requirements and behavior for aRegion.MembershipAttributesprovides options for configuring aRegionto require one or more membership roles to be present in the system for reliable access to theRegion. EachRoleis a user defined string name, such as Producer or Backup or FooProducer.The
LossActiondefines the behavior when one or more required roles are missing.The
ResumptionActionspecifies the action to be taken when reliability resumes.MembershipAttributeshave no effect unless one or more required roles are specified. These attributes are immutable after theRegionhas been created.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.geode.DataSerializable
DataSerializable.Replaceable
-
-
Constructor Summary
Constructors Constructor Description MembershipAttributes()Deprecated.Creates a newMembershipAttributeswith the default configuration of no required roles.MembershipAttributes(String[] requiredRoles)Deprecated.Creates a newMembershipAttributeswith the specified required role names.MembershipAttributes(String[] requiredRoles, LossAction lossAction, ResumptionAction resumptionAction)Deprecated.Creates a newMembershipAttributeswith the specified required role names, reliability policy, and resumption action.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object other)Deprecated.Indicates whether some other object is "equal to" this one.voidfromData(DataInput in)Deprecated.Reads the state of this object as primitive data from the givenDataInput.LossActiongetLossAction()Deprecated.Returns the reliability policy that describes behavior if any required roles are missing.Set<Role>getRequiredRoles()Deprecated.Returns the set of Roles that are required for the reliability of this region.ResumptionActiongetResumptionAction()Deprecated.Returns the resumption action that describes behavior when missing required roles return to the systeminthashCode()Deprecated.Returns a hash code for the object.booleanhasRequiredRoles()Deprecated.Returns true if there are one or more required roles specified.voidreadExternal(ObjectInput in)Deprecated.voidtoData(DataOutput out)Deprecated.Writes the state of this object as primitive data to the givenDataOutput.StringtoString()Deprecated.Returns a string representation of the object.voidwriteExternal(ObjectOutput out)Deprecated.
-
-
-
Constructor Detail
-
MembershipAttributes
public MembershipAttributes()
Deprecated.Creates a newMembershipAttributeswith the default configuration of no required roles.
-
MembershipAttributes
public MembershipAttributes(String[] requiredRoles)
Deprecated.Creates a newMembershipAttributeswith the specified required role names. Reliability policy will default to NO_ACCESS, and resumption action will default to REINITIALIZE.- Parameters:
requiredRoles- array of role names required by this process for reliable access to the region- Throws:
IllegalArgumentException- if no requiredRoles are specified
-
MembershipAttributes
public MembershipAttributes(String[] requiredRoles, LossAction lossAction, ResumptionAction resumptionAction)
Deprecated.Creates a newMembershipAttributeswith the specified required role names, reliability policy, and resumption action.- Parameters:
requiredRoles- array of role names required by this process for reliable access to the regionlossAction- the configuration defining how this process behaves when there are missing required rolesresumptionAction- the action to take when missing required roles return to the system- Throws:
IllegalArgumentException- if the resumptionAction is incompatible with the lossAction or if no requiredRoles are specified
-
-
Method Detail
-
getRequiredRoles
public Set<Role> getRequiredRoles()
Deprecated.Returns the set of Roles that are required for the reliability of this region.- Returns:
- the set of Roles that are required for the reliability of this region
-
hasRequiredRoles
public boolean hasRequiredRoles()
Deprecated.Returns true if there are one or more required roles specified.- Returns:
- whether there are one or more required roles specified
-
getLossAction
public LossAction getLossAction()
Deprecated.Returns the reliability policy that describes behavior if any required roles are missing.- Returns:
- the reliability policy that describes behavior if any required roles are missing
-
getResumptionAction
public ResumptionAction getResumptionAction()
Deprecated.Returns the resumption action that describes behavior when missing required roles return to the system- Returns:
- the resumption action that describes behavior when missing required roles return to the system
-
equals
public boolean equals(Object other)
Deprecated.Indicates whether some other object is "equal to" this one.
-
hashCode
public int hashCode()
Deprecated.Returns a hash code for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.
-
toString
public String toString()
Deprecated.Returns a string representation of the object.
-
toData
public void toData(DataOutput out) throws IOException
Deprecated.Description copied from interface:DataSerializableWrites the state of this object as primitive data to the givenDataOutput.Since 5.7 it is possible for any method call to the specified
DataOutputto throwGemFireRethrowable. It should not be caught by user code. If it is it must be rethrown.- Specified by:
toDatain interfaceDataSerializable- Parameters:
out- theDataOutputto write to- Throws:
IOException- A problem occurs while writing toout
-
fromData
public void fromData(DataInput in) throws IOException, ClassNotFoundException
Deprecated.Description copied from interface:DataSerializableReads the state of this object as primitive data from the givenDataInput.- Specified by:
fromDatain interfaceDataSerializable- Parameters:
in- theDataInputto read from- Throws:
IOException- A problem occurs while reading frominClassNotFoundException- A class could not be loaded while reading fromin
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
Deprecated.- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
Deprecated.- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-