Package org.infinispan.functional.impl
Class MetaParamsInternalMetadata.Builder
java.lang.Object
org.infinispan.functional.impl.MetaParamsInternalMetadata.Builder
- All Implemented Interfaces:
Metadata.Builder
- Enclosing class:
MetaParamsInternalMetadata
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a metadata instance.lifespan
(long time) Set lifespan time assuming that the time unit is milliseconds.Set lifespan time with a given time unit.maxIdle
(long time) Set max idle time assuming that the time unit is milliseconds.Set max idle time with a given time unit.Merges the given metadata information into the given builder.updateCreationTimestamp
(boolean enabled) Sets how the creation timestamp is updated.version
(EntryVersion version) Set version.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
lifespan
Description copied from interface:Metadata.Builder
Set lifespan time with a given time unit.- Specified by:
lifespan
in interfaceMetadata.Builder
- Parameters:
time
- of lifespanunit
- unit of time for lifespan time- Returns:
- a builder instance with the lifespan time applied
-
lifespan
Description copied from interface:Metadata.Builder
Set lifespan time assuming that the time unit is milliseconds.- Specified by:
lifespan
in interfaceMetadata.Builder
- Parameters:
time
- of lifespan, in milliseconds- Returns:
- a builder instance with the lifespan time applied
-
maxIdle
Description copied from interface:Metadata.Builder
Set max idle time with a given time unit.- Specified by:
maxIdle
in interfaceMetadata.Builder
- Parameters:
time
- of max idleunit
- of max idle time- Returns:
- a builder instance with the max idle time applied
-
maxIdle
Description copied from interface:Metadata.Builder
Set max idle time assuming that the time unit is milliseconds.- Specified by:
maxIdle
in interfaceMetadata.Builder
- Parameters:
time
- of max idle, in milliseconds- Returns:
- a builder instance with the max idle time applied
-
version
Description copied from interface:Metadata.Builder
Set version.- Specified by:
version
in interfaceMetadata.Builder
- Parameters:
version
- of the metadata- Returns:
- a builder instance with the version applied
-
updateCreationTimestamp
Description copied from interface:Metadata.Builder
Sets how the creation timestamp is updated.Affects mortal entries only; in other words, for entries where
Metadata.lifespan()
is greater than zero.When
true
(default), the creation timestamp is updated when an entry is created or modified. When set tofalse
, the creation timestamp is updated only when the entry is created.The capability is experimental and Infinispan
Metadata
andMetadata.Builder
does not implement this method. To not update creation timestamps you must create a customMetadata
andMetadata.Builder
implementation.- Specified by:
updateCreationTimestamp
in interfaceMetadata.Builder
- Parameters:
enabled
-false
to disable creation timestamp update when modifying entries.- Returns:
- a builder instance with the version applied.
-
build
Description copied from interface:Metadata.Builder
Build a metadata instance.- Specified by:
build
in interfaceMetadata.Builder
- Returns:
- an instance of metadata
-
add
-
merge
Description copied from interface:Metadata.Builder
Merges the given metadata information into the given builder.- Specified by:
merge
in interfaceMetadata.Builder
- Parameters:
metadata
- to merge into this builder- Returns:
- a builder instance with the metadata applied
-