|
GemFire 6.6.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.gemstone.gemfire.cache.ExpirationAttributes
public class ExpirationAttributes
Immutable parameter object for accessing and setting the attributes associated with
timeToLive and idleTimeout. If the expiration
action is not specified, it defaults to ExpirationAction.INVALIDATE.
If the timeout is not specified, it defaults to zero (which means to never timeout).
AttributesFactory,
RegionAttributes,
AttributesMutator,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.gemstone.gemfire.DataSerializable |
|---|
DataSerializable.Replaceable |
| Field Summary | |
|---|---|
static ExpirationAttributes |
DEFAULT
convenience constant for a default instance |
| Constructor Summary | |
|---|---|
ExpirationAttributes()
Constructs a default ExpirationAttributes, which indicates no expiration
will take place. |
|
ExpirationAttributes(int expirationTime)
Constructs an ExpirationAttributes with the specified expiration time
and the default expiration action ExpirationAction.INVALIDATE. |
|
ExpirationAttributes(int expirationTime,
ExpirationAction expirationAction)
Constructs an ExpirationAttributes with the specified expiration time and
expiration action. |
|
| Method Summary | |
|---|---|
static ExpirationAttributes |
createFromData(DataInput in)
|
boolean |
equals(Object obj)
|
void |
fromData(DataInput in)
Reads the state of this object as primitive data from the given DataInput. |
ExpirationAction |
getAction()
Returns the action that should take place when this value or region expires. |
int |
getTimeout()
Returns the number of seconds before a region or value expires. |
int |
hashCode()
|
void |
toData(DataOutput out)
Writes the state of this object as primitive data to the given DataOutput. |
String |
toString()
Returns a string representation of this ExpirationAttributes. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ExpirationAttributes DEFAULT
| Constructor Detail |
|---|
public ExpirationAttributes()
ExpirationAttributes, which indicates no expiration
will take place.
public ExpirationAttributes(int expirationTime)
ExpirationAttributes with the specified expiration time
and the default expiration action ExpirationAction.INVALIDATE.
expirationTime - The number of seconds before expiration
IllegalArgumentException - if expirationTime is nonpositive
public ExpirationAttributes(int expirationTime,
ExpirationAction expirationAction)
ExpirationAttributes with the specified expiration time and
expiration action.
expirationTime - The number of seconds for a value to live before it expiresexpirationAction - the action to take when the value expires
IllegalArgumentException - if expirationTime is nonpositive| Method Detail |
|---|
public int getTimeout()
public ExpirationAction getAction()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
ExpirationAttributes. If the timeout
is zero, returns "NO EXPIRATION".
toString in class Object
public static ExpirationAttributes createFromData(DataInput in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
public void fromData(DataInput in)
throws IOException,
ClassNotFoundException
DataSerializableDataInput.
fromData in interface DataSerializableIOException - A problem occurs while reading from in
ClassNotFoundException - A class could not be loaded while reading from
in
public void toData(DataOutput out)
throws IOException
DataSerializableDataOutput.
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.
toData in interface DataSerializableIOException - A problem occurs while writing to out
|
GemFire 6.6.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||