public class AddressMapStreamView extends AbstractQueuedStreamView
AbstractQueuedStreamView.BackpointerOp
IStreamView.SearchDirection
Constructor and Description |
---|
AddressMapStreamView(CorfuRuntime runtime,
UUID streamId) |
AddressMapStreamView(CorfuRuntime runtime,
UUID streamId,
StreamOptions options)
Create a new address map stream view.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
discoverAddressSpace(UUID streamId,
NavigableSet<Long> queue,
long startAddress,
long stopAddress,
Function<ILogData,AbstractQueuedStreamView.BackpointerOp> filter,
boolean checkpoint,
long maxGlobal)
Retrieve this stream's address map, i.e., a map of all addresses corresponding to this stream between
(stop address, start address] and return a boolean indicating if addresses were found in this range.
|
long |
getTotalUpdates()
Get total number of updates registered to this stream.
|
protected ILogData |
removeFromQueue(NavigableSet<Long> queue)
Remove next entry from the queue.
|
addToResolvedQueue, append, close, current, fillFromResolved, fillReadQueue, find, gc, getCurrentGlobalPosition, getHasNext, getNextEntries, getNextEntry, previous, read, read, readAll, readRange, resolveCheckpoint
doesEntryUpdateContext, getCurrentContext, hasNext, nextUpTo, popContext, processEntryForContext, pushNewContext, remainingUpTo, reset, seek, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
append, getId, next, remaining, spliterator, spliteratorUpTo, stream, streamUpTo
forEachRemaining, remove
public AddressMapStreamView(CorfuRuntime runtime, UUID streamId, @Nonnull StreamOptions options)
runtime
- The runtime to use for accessing the log.streamId
- The ID of the stream to view.public AddressMapStreamView(CorfuRuntime runtime, UUID streamId)
protected ILogData removeFromQueue(NavigableSet<Long> queue)
AbstractQueuedStreamView
removeFromQueue
in class AbstractQueuedStreamView
queue
- queue of entries.protected boolean discoverAddressSpace(UUID streamId, NavigableSet<Long> queue, long startAddress, long stopAddress, Function<ILogData,AbstractQueuedStreamView.BackpointerOp> filter, boolean checkpoint, long maxGlobal)
discoverAddressSpace
in class AbstractQueuedStreamView
streamId
- stream's ID, it is required because this same method can be used for
discovering addresses from the checkpoint stream.queue
- queue to insert discovered addresses in the given rangestartAddress
- range start address (inclusive)stopAddress
- range end address (exclusive and lower than start address)filter
- function to filter entriescheckpoint
- boolean indicating if it is a checkpoint streammaxGlobal
- maximum Address until which we want to sync (is not necessarily equal to start address)public long getTotalUpdates()
IStreamView
Copyright © 2019 CorfuDB. All rights reserved.