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 |
|---|
EmbeddedMetadata.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.Builderlifespan in interface Metadata.Buildertime - of lifespanunit - unit of time for lifespan timepublic Metadata.Builder lifespan(long time)
Metadata.Builderlifespan in interface Metadata.Buildertime - of lifespan, in millisecondspublic Metadata.Builder maxIdle(long time, TimeUnit unit)
Metadata.BuildermaxIdle in interface Metadata.Buildertime - of max idleunit - of max idle timepublic Metadata.Builder maxIdle(long time)
Metadata.BuildermaxIdle in interface Metadata.Buildertime - of max idle, in millisecondspublic Metadata.Builder version(EntryVersion version)
Metadata.Builderversion in interface Metadata.Builderversion - of the metadatapublic Metadata build()
Metadata.Builderbuild in interface Metadata.Builderprotected boolean hasLifespan()
protected boolean hasMaxIdle()
public Metadata.Builder merge(Metadata metadata)
Metadata.Buildermerge in interface Metadata.Buildermetadata - to merge into this builderCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.