Revisions.Option
Constructor and Description |
---|
MemoryStoreRevisions() |
Modifier and Type | Method and Description |
---|---|
void |
bind(MemoryStore store)
Bind this instance to a
store . |
@NotNull RecordId |
getHead()
Returns the record id of the head state.
|
@NotNull RecordId |
getPersistedHead()
Returns the persisted to disk record id of the head state.
|
RecordId |
setHead(@NotNull Function<RecordId,RecordId> newHead,
Revisions.Option... options)
Not supported: throws
UnsupportedOperationException |
boolean |
setHead(@NotNull RecordId expected,
@NotNull RecordId head,
Revisions.Option... options)
Atomically set the record id of the current head state to the
given
head state if the current head state matches
the expected value. |
public void bind(MemoryStore store) throws IOException
store
.IOException
@NotNull public @NotNull RecordId getHead()
Revisions
SegmentNodeState
.@NotNull public @NotNull RecordId getPersistedHead()
Revisions
SegmentNodeState
.getPersistedHead
in interface Revisions
public boolean setHead(@NotNull @NotNull RecordId expected, @NotNull @NotNull RecordId head, @NotNull Revisions.Option... options)
Revisions
head
state if the current head state matches
the expected
value.
All record ids must be valid ids for SegmentNodeState
s.
The locking behaviour of this method regarding implementation specific.
public RecordId setHead(@NotNull @NotNull Function<RecordId,RecordId> newHead, @NotNull Revisions.Option... options) throws InterruptedException
UnsupportedOperationException
setHead
in interface Revisions
newHead
- function mapping an record id to the record id to which
the current head id should be set.options
- implementation specific optionsnull
otherwise.UnsupportedOperationException
- alwaysInterruptedException
- Blocking implementations may throw this exception whe
interrupted.Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.