Constructor and Description |
---|
SequencerClient(IClientRouter router,
long epoch) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Boolean> |
bootstrap(Long initialToken,
Map<UUID,StreamAddressSpace> streamAddressSpaceMap,
Long readyStateEpoch)
Resets the sequencer with the specified initialToken.
|
CompletableFuture<Boolean> |
bootstrap(Long initialToken,
Map<UUID,StreamAddressSpace> streamAddressSpaceMap,
Long readyStateEpoch,
boolean bootstrapWithoutTailsUpdate)
Resets the sequencer with the specified initialToken
|
CompletableFuture<StreamsAddressResponse> |
getStreamsAddressSpace(List<StreamAddressRange> streamsAddressesRange)
Retrieves from the sequencer the address space for the specified streams in the given ranges.
|
CompletableFuture<TokenResponse> |
nextToken(List<UUID> streamIDs,
long numTokens)
Fetches the next available token from the sequencer.
|
CompletableFuture<TokenResponse> |
nextToken(List<UUID> streamIDs,
long numTokens,
TxResolutionInfo conflictInfo)
Fetches the next available token from the sequencer.
|
CompletableFuture<SequencerMetrics> |
requestMetrics()
Sends a metrics request to the sequencer server.
|
void |
sendMessage(CorfuMsg msg) |
CompletableFuture<Void> |
trimCache(Long address) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHandledTypes, getMsgHandler, getRouter, handleMessage, setRouter
public SequencerClient(IClientRouter router, long epoch)
public CompletableFuture<SequencerMetrics> requestMetrics()
public CompletableFuture<TokenResponse> nextToken(List<UUID> streamIDs, long numTokens)
streamIDs
- Set of streamIDs to be assigned ot the token.numTokens
- Number of tokens to be reserved.public CompletableFuture<StreamsAddressResponse> getStreamsAddressSpace(List<StreamAddressRange> streamsAddressesRange)
streamsAddressesRange
- requested streams and ranges.public CompletableFuture<TokenResponse> nextToken(List<UUID> streamIDs, long numTokens, TxResolutionInfo conflictInfo)
streamIDs
- Set of streamIDs to be assigned ot the token.numTokens
- Number of tokens to be reserved.conflictInfo
- Transaction resolution conflict parameters.public CompletableFuture<Void> trimCache(Long address)
public CompletableFuture<Boolean> bootstrap(Long initialToken, Map<UUID,StreamAddressSpace> streamAddressSpaceMap, Long readyStateEpoch, boolean bootstrapWithoutTailsUpdate)
initialToken
- Token Number which the sequencer starts distributing.streamAddressSpaceMap
- Per stream map of address space.readyStateEpoch
- Epoch at which the sequencer is ready and to stamp tokens.bootstrapWithoutTailsUpdate
- True, if this is a delta message and just updates an
existing primary sequencer with the new epoch.
False otherwise.public CompletableFuture<Boolean> bootstrap(Long initialToken, Map<UUID,StreamAddressSpace> streamAddressSpaceMap, Long readyStateEpoch)
initialToken
- Token Number which the sequencer starts distributing.streamAddressSpaceMap
- Per stream map of address space.readyStateEpoch
- Epoch at which the sequencer is ready and to stamp tokens.public void sendMessage(CorfuMsg msg)
Copyright © 2019 CorfuDB. All rights reserved.