DEFAULT_MAX_APPEND_BLOCK_SIZE| Constructor and Description |
|---|
LogStreamService(LogStreamBuilder builder) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the log stream synchronously.
|
ActorFuture<Void> |
closeAppender()
Stops the streaming to the log storage.
|
ActorFuture<Void> |
closeAsync()
Closes the log stream asynchronous.
|
LogStream |
get() |
long |
getCommitPosition() |
LogBlockIndex |
getLogBlockIndex()
Returns the LogBlockIndex object, which is used for indexing the LogStorage.
|
Injector<LogBlockIndex> |
getLogBlockIndexInjector() |
LogBlockIndexWriter |
getLogBlockIndexWriter()
Returns the log block index controller, which creates periodically the block index for the log
storage.
|
Injector<LogBlockIndexWriter> |
getLogBockIndexWriterInjector() |
String |
getLogName()
Returns the name of the log stream.
|
LogStorage |
getLogStorage()
Returns the log storage, which is accessed by the LogStream.
|
LogStorageAppender |
getLogStorageAppender()
Returns the log stream controller, which streams the logged events from the write buffer into
the log storage.
|
Injector<LogStorage> |
getLogStorageInjector() |
int |
getPartitionId() |
int |
getTerm() |
Dispatcher |
getWriteBuffer()
Returns the writeBuffer, which is used by the LogStreamController to stream the content into
the log storage.
|
ActorFuture<LogStorageAppender> |
openAppender()
This method delegates to
#openLogStreamController(AgentRunnerService, int). |
void |
registerOnAppendCondition(ActorCondition condition) |
void |
registerOnCommitPositionUpdatedCondition(ActorCondition condition) |
void |
removeOnAppendCondition(ActorCondition condition) |
void |
removeOnCommitPositionUpdatedCondition(ActorCondition condition) |
void |
setCommitPosition(long commitPosition)
Sets the log streams commit position to the given position.
|
void |
setTerm(int term)
Sets the log streams term.
|
void |
start(ServiceStartContext startContext) |
void |
stop(ServiceStopContext stopContext) |
void |
truncate(long position)
Truncates the log stream from the given position to the end of the stream.
|
public LogStreamService(LogStreamBuilder builder)
public void start(ServiceStartContext startContext)
public ActorFuture<LogStorageAppender> openAppender()
LogStream#openLogStreamController(AgentRunnerService, int).
The LogStream.DEFAULT_MAX_APPEND_BLOCK_SIZE is used as default max append block size and the
old agent runner service is reused.
openAppender in interface LogStream#openLogStreamController(AgentRunnerService, int)}public ActorFuture<Void> closeAppender()
LogStreamcloseAppender in interface LogStreampublic void stop(ServiceStopContext stopContext)
public int getPartitionId()
getPartitionId in interface LogStreampublic String getLogName()
LogStreamgetLogName in interface LogStreampublic void close()
LogStreamclose in interface LogStreamclose in interface AutoCloseablepublic ActorFuture<Void> closeAsync()
LogStreamcloseAsync in interface LogStreampublic LogStorage getLogStorage()
LogStreamgetLogStorage in interface LogStreampublic LogBlockIndex getLogBlockIndex()
LogStreamgetLogBlockIndex in interface LogStreampublic LogBlockIndexWriter getLogBlockIndexWriter()
LogStreamgetLogBlockIndexWriter in interface LogStreampublic Dispatcher getWriteBuffer()
LogStreamgetWriteBuffer in interface LogStreampublic LogStorageAppender getLogStorageAppender()
LogStreamgetLogStorageAppender in interface LogStreampublic long getCommitPosition()
getCommitPosition in interface LogStreampublic void truncate(long position)
LogStreampublic void setCommitPosition(long commitPosition)
LogStreamsetCommitPosition in interface LogStreampublic void registerOnCommitPositionUpdatedCondition(ActorCondition condition)
registerOnCommitPositionUpdatedCondition in interface LogStreampublic void removeOnCommitPositionUpdatedCondition(ActorCondition condition)
removeOnCommitPositionUpdatedCondition in interface LogStreampublic void registerOnAppendCondition(ActorCondition condition)
registerOnAppendCondition in interface LogStreampublic void removeOnAppendCondition(ActorCondition condition)
removeOnAppendCondition in interface LogStreampublic int getTerm()
public void setTerm(int term)
LogStreampublic Injector<LogBlockIndex> getLogBlockIndexInjector()
public Injector<LogBlockIndexWriter> getLogBockIndexWriterInjector()
public Injector<LogStorage> getLogStorageInjector()
Copyright © 2017–2018 camunda services GmbH. All rights reserved.