public interface StreamLog
Created by maithem on 7/15/16.
Modifier and Type | Method and Description |
---|---|
void |
append(List<LogData> entries)
Append a range of consecutive entries ordered by their addresses.
|
void |
append(long address,
LogData entry)
Append an entry to the stream log.
|
void |
close()
Close the stream log.
|
void |
compact()
Remove all trimmed addresses from the StreamLog.
|
TailsResponse |
getAllTails()
Get global and all stream tails.
|
long |
getLogTail()
Get the global log tail.
|
default OverwriteCause |
getOverwriteCauseForAddress(long address,
LogData entry)
Get overwrite cause for a given address.
|
StreamsAddressResponse |
getStreamsAddressSpace()
Get the address space for every stream.
|
TailsResponse |
getTails(List<UUID> streams)
Get the global tail and stream tails.
|
long |
getTrimMark()
Get the first untrimmed address in the address space.
|
void |
prefixTrim(long address)
Prefix trim the global log.
|
LogData |
read(long address)
Given an address, read the corresponding stream entry.
|
void |
reset()
Clears all data and resets all segment handlers.
|
void |
sync(boolean force)
Sync the stream log file to secondary storage.
|
void append(long address, LogData entry)
address
- address of append entryentry
- entry to append to the logvoid append(List<LogData> entries)
entries
- LogData read(long address)
address
- address to read from the logvoid prefixTrim(long address)
address
- address to trim the log up tovoid compact()
TailsResponse getTails(List<UUID> streams)
long getLogTail()
TailsResponse getAllTails()
StreamsAddressResponse getStreamsAddressSpace()
long getTrimMark()
void sync(boolean force) throws IOException
force
- force data to secondary storage if trueIOException
void close()
void reset()
default OverwriteCause getOverwriteCauseForAddress(long address, LogData entry)
address
- global log addressentry
- entry which would cause the overwriteCopyright © 2019 CorfuDB. All rights reserved.