public class StreamsView extends AbstractView
Modifier and Type | Field and Description |
---|---|
static String |
CHECKPOINT_SUFFIX
Checkpoint of streams have their own stream id derived from the
stream id.
|
Constructor and Description |
---|
StreamsView(CorfuRuntime runtime) |
Modifier and Type | Method and Description |
---|---|
long |
append(Object object,
TxResolutionInfo conflictInfo,
CacheOption cacheOption,
UUID... streamIDs)
Append to multiple streams simultaneously, possibly providing
information on how to resolve conflicts.
|
long |
append(Object object,
TxResolutionInfo conflictInfo,
UUID... streamIDs)
Append to multiple streams and caches the result.
|
void |
gc(long trimMark)
Run garbage collection on all opened streams.
|
IStreamView |
get(UUID stream)
Get a view on a stream.
|
IStreamView |
get(UUID stream,
StreamOptions options)
Get a view on a stream.
|
IStreamView |
getUnsafe(UUID stream)
Since streams can also be used by higher level abstractions, some consumers implement
synchronization at a higher level, so the stream implementation doesn't have to
be thread-safe.
|
IStreamView |
getUnsafe(UUID stream,
StreamOptions options) |
getCurrentLayout, layoutHelper, layoutHelper
public static final String CHECKPOINT_SUFFIX
public StreamsView(CorfuRuntime runtime)
public IStreamView get(UUID stream)
stream
- The UUID of the stream to get a view on.public IStreamView getUnsafe(UUID stream)
stream
- stream idpublic IStreamView get(UUID stream, StreamOptions options)
stream
- The UUID of the stream to get a view on.public IStreamView getUnsafe(UUID stream, StreamOptions options)
public void gc(long trimMark)
public long append(@Nonnull Object object, @Nullable TxResolutionInfo conflictInfo, @Nonnull CacheOption cacheOption, @Nonnull UUID... streamIDs)
streamIDs
- The streams to append to.object
- The object to append to each stream.conflictInfo
- Conflict information for the sequencer to check.cacheOption
- The caching mode for write/appendTransactionAbortedException
- If the transaction was aborted by
the sequencer.Copyright © 2019 CorfuDB. All rights reserved.