Class MetadataCollectionImpl<V>
- java.lang.Object
-
- org.infinispan.client.hotrod.impl.multimap.metadata.MetadataCollectionImpl<V>
-
- All Implemented Interfaces:
Metadata
,MetadataCollection<V>
,Versioned
public class MetadataCollectionImpl<V> extends Object implements MetadataCollection<V>
The values used in this class are assumed to be in MILLISECONDS- Since:
- 9.2
- Author:
- Katia Aresti, karesti@redhat.com
-
-
Constructor Summary
Constructors Constructor Description MetadataCollectionImpl(Collection<V> collection)
MetadataCollectionImpl(Collection<V> collection, long created, int lifespan, long lastUsed, int maxIdle, long version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<V>
getCollection()
Collection of values with metadatalong
getCreated()
long
getLastUsed()
int
getLifespan()
int
getMaxIdle()
long
getVersion()
String
toString()
-
-
-
Constructor Detail
-
MetadataCollectionImpl
public MetadataCollectionImpl(Collection<V> collection)
-
MetadataCollectionImpl
public MetadataCollectionImpl(Collection<V> collection, long created, int lifespan, long lastUsed, int maxIdle, long version)
-
-
Method Detail
-
getCollection
public Collection<V> getCollection()
Description copied from interface:MetadataCollection
Collection of values with metadata- Specified by:
getCollection
in interfaceMetadataCollection<V>
- Returns:
- the collection
-
getCreated
public long getCreated()
- Specified by:
getCreated
in interfaceMetadata
- Returns:
- Time when entry was created. -1 for immortal entries.
-
getLifespan
public int getLifespan()
- Specified by:
getLifespan
in interfaceMetadata
- Returns:
- Lifespan of the entry in seconds. Negative values are interpreted as unlimited lifespan.
-
getLastUsed
public long getLastUsed()
- Specified by:
getLastUsed
in interfaceMetadata
- Returns:
- Time when entry was last used. -1 for immortal entries.
-
getMaxIdle
public int getMaxIdle()
- Specified by:
getMaxIdle
in interfaceMetadata
- Returns:
- The maximum amount of time (in seconds) this key is allowed to be idle for before it is considered as expired.
-
getVersion
public long getVersion()
- Specified by:
getVersion
in interfaceVersioned
-
-