Constructor and Description |
---|
LogUnitClient(IClientRouter router,
long epoch) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
compact()
Send a compact request that will delete the trimmed parts of the log.
|
CompletableFuture<Boolean> |
fillHole(Token address)
Fill a hole at a given address.
|
CompletableFuture<Void> |
flushCache()
Send a flush cache request that will flush the logunit cache.
|
CompletableFuture<TailsResponse> |
getAllTails()
Get all stream tails (i.e., maximum address written to every stream) and global tail.
|
String |
getHost() |
CompletableFuture<StreamsAddressResponse> |
getLogAddressSpace()
Get the address space for all streams in the log.
|
CompletableFuture<TailsResponse> |
getLogTail()
Get the global tail maximum address the log unit has written.
|
Integer |
getPort() |
CompletableFuture<Long> |
getTrimMark()
Get the starting address of a log unit.
|
CompletableFuture<Void> |
prefixTrim(Token address)
Send a prefix trim request that will trim the log up to a certain address
|
CompletableFuture<ReadResponse> |
read(long address)
Asynchronously read from the logging unit.
|
CompletableFuture<ReadResponse> |
readAll(List<Long> list)
Read data from the log unit server for a list of addresses.
|
CompletableFuture<Boolean> |
resetLogUnit(long epoch)
Send a reset request.
|
void |
sendMessage(CorfuMsg msg) |
CompletableFuture<Boolean> |
write(ILogData payload)
Asynchronously write to the logging unit.
|
CompletableFuture<Boolean> |
write(long address,
IMetadata.DataRank rank,
Object writeObject,
Map<UUID,Long> backpointerMap)
Asynchronously write to the logging unit.
|
CompletableFuture<Boolean> |
writeRange(List<LogData> range)
Sends a request to write a list of addresses.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHandledTypes, getMsgHandler, getRouter, handleMessage, setRouter
public LogUnitClient(IClientRouter router, long epoch)
public String getHost()
public Integer getPort()
public CompletableFuture<Boolean> write(long address, IMetadata.DataRank rank, Object writeObject, Map<UUID,Long> backpointerMap)
address
- the address to write to.rank
- the rank of this write (used for quorum replication).writeObject
- the object, pre-serialization, to write.backpointerMap
- the map of backpointers to write.public CompletableFuture<Boolean> write(ILogData payload)
payload
- The log data to write to the logging unit.public CompletableFuture<Boolean> writeRange(List<LogData> range)
range
- entries to write to the log unit. Must have at least one entry.public CompletableFuture<ReadResponse> read(long address)
address
- The address to read from.public CompletableFuture<ReadResponse> readAll(List<Long> list)
list
- list of global addresses.public CompletableFuture<TailsResponse> getLogTail()
public CompletableFuture<TailsResponse> getAllTails()
public CompletableFuture<StreamsAddressResponse> getLogAddressSpace()
public CompletableFuture<Long> getTrimMark()
public CompletableFuture<Void> prefixTrim(Token address)
address
- an address to trim up to (i.e. [0, address))public CompletableFuture<Void> compact()
public CompletableFuture<Void> flushCache()
public CompletableFuture<Boolean> fillHole(Token address)
address
- the address to fill a hole at.public CompletableFuture<Boolean> resetLogUnit(long epoch)
epoch
- epoch to check and set epochWaterMark.public void sendMessage(CorfuMsg msg)
Copyright © 2019 CorfuDB. All rights reserved.