public static class EmbeddedMetadata.Builder extends Object implements Metadata.Builder
Modifier and Type | Field and Description |
---|---|
protected Long |
lifespan |
protected TimeUnit |
lifespanUnit |
protected Long |
maxIdle |
protected TimeUnit |
maxIdleUnit |
protected EntryVersion |
version |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
Metadata |
build()
Build a metadata instance.
|
protected boolean |
hasLifespan() |
protected boolean |
hasMaxIdle() |
Metadata.Builder |
lifespan(long time)
Set lifespan time assuming that the time unit is milliseconds.
|
Metadata.Builder |
lifespan(long time,
TimeUnit unit)
Set lifespan time with a given time unit.
|
Metadata.Builder |
maxIdle(long time)
Set max idle time assuming that the time unit is milliseconds.
|
Metadata.Builder |
maxIdle(long time,
TimeUnit unit)
Set max idle time with a given time unit.
|
Metadata.Builder |
merge(Metadata metadata)
Merges the given metadata information into the given builder.
|
Metadata.Builder |
version(EntryVersion version)
Set version.
|
protected Long lifespan
protected TimeUnit lifespanUnit
protected Long maxIdle
protected TimeUnit maxIdleUnit
protected EntryVersion version
public Metadata.Builder lifespan(long time, TimeUnit unit)
Metadata.Builder
lifespan
in interface Metadata.Builder
time
- of lifespanunit
- unit of time for lifespan timepublic Metadata.Builder lifespan(long time)
Metadata.Builder
lifespan
in interface Metadata.Builder
time
- of lifespan, in millisecondspublic Metadata.Builder maxIdle(long time, TimeUnit unit)
Metadata.Builder
maxIdle
in interface Metadata.Builder
time
- of max idleunit
- of max idle timepublic Metadata.Builder maxIdle(long time)
Metadata.Builder
maxIdle
in interface Metadata.Builder
time
- of max idle, in millisecondspublic Metadata.Builder version(EntryVersion version)
Metadata.Builder
version
in interface Metadata.Builder
version
- of the metadatapublic Metadata build()
Metadata.Builder
build
in interface Metadata.Builder
protected boolean hasLifespan()
protected boolean hasMaxIdle()
public Metadata.Builder merge(Metadata metadata)
Metadata.Builder
merge
in interface Metadata.Builder
metadata
- to merge into this builderCopyright © 2020 JBoss, a division of Red Hat. All rights reserved.