@Deprecated public interface ISMRStream
This class defines an API for supporting stream operations on the SMR layer. ISMRStream wraps a pure stream and provides a similar API: append, remainingTo, current, previous, pos and seek. Different from a stream, the entries returned from methods that obtain stream entries, like current, previous, are of type SMREntry.
Created by mwei on 3/13/17.
Modifier and Type | Method and Description |
---|---|
long |
append(SMREntry entry,
Function<TokenResponse,Boolean> acquisitionCallback,
Function<TokenResponse,Boolean> deacquisitionCallback)
Deprecated.
Append a SMREntry to the stream, returning the global address
it was written at.
|
List<SMREntry> |
current()
Deprecated.
|
void |
gc(long trimMark)
Deprecated.
|
default UUID |
getID()
Deprecated.
|
long |
pos()
Deprecated.
|
List<SMREntry> |
previous()
Deprecated.
|
List<SMREntry> |
remainingUpTo(long maxGlobal)
Deprecated.
|
void |
reset()
Deprecated.
|
void |
seek(long globalAddress)
Deprecated.
|
Stream<SMREntry> |
stream()
Deprecated.
|
Stream<SMREntry> |
streamUpTo(long maxGlobal)
Deprecated.
|
long pos()
void reset()
void seek(long globalAddress)
void gc(long trimMark)
long append(SMREntry entry, Function<TokenResponse,Boolean> acquisitionCallback, Function<TokenResponse,Boolean> deacquisitionCallback)
Optionally, provide a method to be called when an address is acquired, and also a method to be called when an address is released (due to an unsuccessful append).
entry
- The SMR entry to append.acquisitionCallback
- A function to call when an address is
acquired.
It should return true to continue with the
append.deacquisitionCallback
- A function to call when an address is
released. It should return true to retry
writing.@Deprecated default UUID getID()
Copyright © 2019 CorfuDB. All rights reserved.