Package tech.rsqn.cacheservice.support
Class DefaultCacheEntryValue
- java.lang.Object
-
- tech.rsqn.cacheservice.support.DefaultCacheEntryValue
-
- All Implemented Interfaces:
java.io.Serializable,CacheEntryValue
public class DefaultCacheEntryValue extends java.lang.Object implements CacheEntryValue, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultCacheEntryValue()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultCacheEntryValueandTimeToLiveMilliseconds(long ttl)booleanequals(java.lang.Object o)longgetInserted()java.lang.StringgetKey()longgetTimeToLiveMilliSeconds()<T> TgetValue()inthashCode()booleanisValid()voidsetInserted(long inserted)voidsetTimeToLiveMilliSeconds(long timeToLiveMilliSeconds)<T> voidsetValue(T value)static <T> DefaultCacheEntryValuewith(java.lang.String key, java.lang.Object v)
-
-
-
Method Detail
-
with
public static <T> DefaultCacheEntryValue with(java.lang.String key, java.lang.Object v)
-
andTimeToLiveMilliseconds
public DefaultCacheEntryValue andTimeToLiveMilliseconds(long ttl)
-
getKey
public java.lang.String getKey()
-
isValid
public boolean isValid()
-
setValue
public <T> void setValue(T value)
- Specified by:
setValuein interfaceCacheEntryValue
-
getValue
public final <T> T getValue()
- Specified by:
getValuein interfaceCacheEntryValue
-
getInserted
public long getInserted()
-
setInserted
public void setInserted(long inserted)
-
getTimeToLiveMilliSeconds
public long getTimeToLiveMilliSeconds()
-
setTimeToLiveMilliSeconds
public void setTimeToLiveMilliSeconds(long timeToLiveMilliSeconds)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-