public interface Log
MessageReaders.| Modifier and Type | Method and Description |
|---|---|
Future<Message> |
add(StaticBuffer content)
Attempts to add the given content to the log and returns a
Future for this action. |
Future<Message> |
add(StaticBuffer content,
StaticBuffer key)
Attempts to add the given content to the log and returns a
Future for this action. |
void |
close()
Closes this log and stops the reading process.
|
String |
getName()
Returns the name of this log
|
void |
registerReader(MessageReader... reader) |
void |
registerReaders(Iterable<MessageReader> readers)
Registers the given readers with this log.
|
boolean |
unregisterReader(MessageReader reader)
Removes the given reader from the list of registered readers and returns whether this reader was registered in the
first place.
|
Future<Message> add(StaticBuffer content)
Future for this action.
If the log is configured for immediate sending, then any exception encountered during this process is thrown
by this method. Otherwise, encountered exceptions are attached to the returned future.content - Future<Message> add(StaticBuffer content, StaticBuffer key)
Future for this action.
In addition, a key is provided to signal the recipient of the log message in partitioned logging systems.
If the log is configured for immediate sending, then any exception encountered during this process is thrown
by this method. Otherwise, encountered exceptions are attached to the returned future.content - void registerReader(MessageReader... reader)
reader - registerReaders(Iterable)void registerReaders(Iterable<MessageReader> readers)
readers - boolean unregisterReader(MessageReader reader)
close() instead.reader - String getName()
void close()
throws StorageException
StorageExceptionCopyright © 2012–2014. All rights reserved.