Interface OffsetValue<V>
- Type Parameters:
V- the value type
- All Known Implementing Classes:
OffsetValue.DefaultOffsetValue,OffsetValue.DurationOffsetValue,OffsetValue.InstantOffsetValue,OffsetValue.TemporalOffsetValue
Encapsulates a value that is offset from some basis, and updated via
Value.set(Object).- Author:
- Paul Ferraro
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classstatic classstatic classNested classes/interfaces inherited from interface org.wildfly.clustering.server.offset.Value
Value.AbstractValue<V> -
Method Summary
Modifier and TypeMethodDescriptionstatic OffsetValue<Duration> static OffsetValue<Instant> default Vget()Returns the current value, computed by applying the current offset to the basis.getBasis()Returns the basis from which the associated offset will be applied.The current offset.rebase()Returns a new offset value based on the current value.default voidSets the current offset.
-
Method Details
-
getBasis
V getBasis()Returns the basis from which the associated offset will be applied.- Returns:
- the basis from which the associated offset will be applied.
-
get
Returns the current value, computed by applying the current offset to the basis. -
getOffset
The current offset.- Returns:
- an offset
-
setOffset
Sets the current offset.- Parameters:
offset- an offset
-
rebase
OffsetValue<V> rebase()Returns a new offset value based on the current value.- Returns:
- a new offset value
-
from
-
from
-