public class BackpointerStreamView extends AbstractQueuedStreamView
In this implementation, all addresses are global (log) addresses.
All method calls of this class are thread-safe.
Created by mwei on 12/11/15.
AbstractQueuedStreamView.BackpointerOp
IStreamView.SearchDirection
Constructor and Description |
---|
BackpointerStreamView(CorfuRuntime runtime,
UUID streamId) |
BackpointerStreamView(CorfuRuntime runtime,
UUID streamId,
StreamOptions options)
Create a new backpointer 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)
Defines the strategy to discover addresses belonging to this stream.
|
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 BackpointerStreamView(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 BackpointerStreamView(CorfuRuntime runtime, UUID streamId)
protected ILogData removeFromQueue(NavigableSet<Long> queue)
AbstractQueuedStreamView
removeFromQueue
in class AbstractQueuedStreamView
queue
- queue of entries.public long getTotalUpdates()
IStreamView
protected boolean discoverAddressSpace(UUID streamId, NavigableSet<Long> queue, long startAddress, long stopAddress, Function<ILogData,AbstractQueuedStreamView.BackpointerOp> filter, boolean checkpoint, long maxGlobal)
AbstractQueuedStreamView
discoverAddressSpace
in class AbstractQueuedStreamView
streamId
- stream unique identifier.queue
- queue to fill up.startAddress
- read start address (inclusive)stopAddress
- read stop address (exclusive)filter
- filter to apply to datacheckpoint
- true if checkpoint discovery, false otherwise.maxGlobal
- max address to resolve discovery.Copyright © 2019 CorfuDB. All rights reserved.