Package org.infinispan.metadata
Class EmbeddedMetadata.Builder
- java.lang.Object
-
- org.infinispan.metadata.EmbeddedMetadata.Builder
-
- All Implemented Interfaces:
Metadata.Builder
- Enclosing class:
- EmbeddedMetadata
public static class EmbeddedMetadata.Builder extends Object implements Metadata.Builder
-
-
Field Summary
Fields Modifier and Type Field Description protected Longlifespanprotected TimeUnitlifespanUnitprotected LongmaxIdleprotected TimeUnitmaxIdleUnitprotected org.infinispan.container.versioning.EntryVersionversion
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Metadatabuild()Build a metadata instance.protected booleanhasLifespan()protected booleanhasMaxIdle()Metadata.Builderlifespan(long time)Set lifespan time assuming that the time unit is milliseconds.Metadata.Builderlifespan(long time, TimeUnit unit)Set lifespan time with a given time unit.Metadata.BuildermaxIdle(long time)Set max idle time assuming that the time unit is milliseconds.Metadata.BuildermaxIdle(long time, TimeUnit unit)Set max idle time with a given time unit.Metadata.Buildermerge(Metadata metadata)Merges the given metadata information into the given builder.Metadata.Builderversion(org.infinispan.container.versioning.EntryVersion version)Set version.
-
-
-
Method Detail
-
lifespan
public Metadata.Builder lifespan(long time, TimeUnit unit)
Description copied from interface:Metadata.BuilderSet lifespan time with a given time unit.- Specified by:
lifespanin interfaceMetadata.Builder- Parameters:
time- of lifespanunit- unit of time for lifespan time- Returns:
- a builder instance with the lifespan time applied
-
lifespan
public Metadata.Builder lifespan(long time)
Description copied from interface:Metadata.BuilderSet lifespan time assuming that the time unit is milliseconds.- Specified by:
lifespanin interfaceMetadata.Builder- Parameters:
time- of lifespan, in milliseconds- Returns:
- a builder instance with the lifespan time applied
-
maxIdle
public Metadata.Builder maxIdle(long time, TimeUnit unit)
Description copied from interface:Metadata.BuilderSet max idle time with a given time unit.- Specified by:
maxIdlein interfaceMetadata.Builder- Parameters:
time- of max idleunit- of max idle time- Returns:
- a builder instance with the max idle time applied
-
maxIdle
public Metadata.Builder maxIdle(long time)
Description copied from interface:Metadata.BuilderSet max idle time assuming that the time unit is milliseconds.- Specified by:
maxIdlein interfaceMetadata.Builder- Parameters:
time- of max idle, in milliseconds- Returns:
- a builder instance with the max idle time applied
-
version
public Metadata.Builder version(org.infinispan.container.versioning.EntryVersion version)
Description copied from interface:Metadata.BuilderSet version.- Specified by:
versionin interfaceMetadata.Builder- Parameters:
version- of the metadata- Returns:
- a builder instance with the version applied
-
build
public Metadata build()
Description copied from interface:Metadata.BuilderBuild a metadata instance.- Specified by:
buildin interfaceMetadata.Builder- Returns:
- an instance of metadata
-
hasLifespan
protected boolean hasLifespan()
-
hasMaxIdle
protected boolean hasMaxIdle()
-
merge
public Metadata.Builder merge(Metadata metadata)
Description copied from interface:Metadata.BuilderMerges the given metadata information into the given builder.- Specified by:
mergein interfaceMetadata.Builder- Parameters:
metadata- to merge into this builder- Returns:
- a builder instance with the metadata applied
-
-