public class SequencerView extends AbstractView
Constructor and Description |
---|
SequencerView(CorfuRuntime runtime) |
Modifier and Type | Method and Description |
---|---|
StreamAddressSpace |
getStreamAddressSpace(StreamAddressRange streamsAddressesRange)
Retrieve a stream's address space from sequencer server.
|
Map<UUID,StreamAddressSpace> |
getStreamsAddressSpace(List<StreamAddressRange> streamsAddressesRange)
Retrieve multiple streams address space.
|
TokenResponse |
next(TxResolutionInfo conflictInfo,
UUID... streamIds)
Acquire a token for a number of streams if there are no conflicts.
|
TokenResponse |
next(UUID... streamIds)
Return the next token in the sequencer for a particular stream.
|
TokenResponse |
nextToken(Set<UUID> streamIDs,
int numTokens)
Deprecated.
|
TokenResponse |
nextToken(Set<UUID> streamIDs,
int numTokens,
TxResolutionInfo conflictInfo)
Deprecated.
|
TokenResponse |
query(UUID... streamIds)
Return the next token in the sequencer for the global tail or the tails
of multiple streams.
|
void |
trimCache(long address) |
getCurrentLayout, layoutHelper, layoutHelper
public SequencerView(CorfuRuntime runtime)
public TokenResponse query(UUID... streamIds)
streamIds
- the streams to querypublic TokenResponse next(UUID... streamIds)
streamIds
- The stream IDs to retrieve from.public StreamAddressSpace getStreamAddressSpace(StreamAddressRange streamsAddressesRange)
streamsAddressesRange
- range of streams address space to request.public Map<UUID,StreamAddressSpace> getStreamsAddressSpace(List<StreamAddressRange> streamsAddressesRange)
streamsAddressesRange
- list of streams and ranges to be requested.public TokenResponse next(TxResolutionInfo conflictInfo, UUID... streamIds)
conflictInfo
- transaction conflict infostreamIds
- streams to acquire the token for@Deprecated public TokenResponse nextToken(Set<UUID> streamIDs, int numTokens)
If numTokens == 0, then the streamAddressesMap returned is the last handed out token for each stream (if streamIDs is not empty). The token returned is the global address as previously defined, namely, max global address across all the streams.
streamIDs
- The stream IDs to retrieve from.numTokens
- The number of tokens to reserve.@Deprecated public TokenResponse nextToken(Set<UUID> streamIDs, int numTokens, TxResolutionInfo conflictInfo)
public void trimCache(long address)
Copyright © 2019 CorfuDB. All rights reserved.