Package org.nuxeo.lib.stream.log.mem
Class MemLogManager
java.lang.Object
org.nuxeo.lib.stream.log.internals.AbstractLogManager
org.nuxeo.lib.stream.log.mem.MemLogManager
- All Implemented Interfaces:
AutoCloseable
,LogManager
Memory implementation of LogManager.
-
Field Summary
Fields inherited from class org.nuxeo.lib.stream.log.internals.AbstractLogManager
ADMIN_GROUP, appenders, tailers, tailersAssignments
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clear()
void
<M extends Externalizable>
CloseableLogAppender<M>createAppender
(Name name, Codec<M> codec) boolean
Tries to delete a Log.protected <M extends Externalizable>
LogTailer<M>doCreateTailer
(Collection<LogPartition> partitions, Name group, Codec<M> codec) protected <M extends Externalizable>
LogTailer<M>doSubscribe
(Name group, Collection<Name> names, RebalanceListener listener, Codec<M> codec) boolean
Returnstrue
if a Log with thisname
exists.getLagPerPartition
(Name name, Name group) Returns the lag between consumergroup
and the producers for each partition.int
Returns all the Log names.listConsumerGroups
(Name name) List the consumer groups for a Log.toString()
Methods inherited from class org.nuxeo.lib.stream.log.internals.AbstractLogManager
checkInvalidAssignment, checkInvalidCodec, cleanTailers, close, createIfNotExists, createTailer, getAppender, getLatencyPerPartition, guessCodec, sameCodec, size, subscribe, supportSubscribe, supportSubscribe
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.nuxeo.lib.stream.log.LogManager
createIfNotExists, createTailer, createTailer, createTailer, createTailer, createTailer, createTailer, createTailer, createTailer, createTailer, createTailer, createTailer, delete, deleteConsumers, deleteRecords, exists, getAppender, getAppender, getAppender, getLag, getLag, getLagPerPartition, getLatency, getLatency, getLatencyPerPartition, listAll, listConsumerGroups, size, subscribe, subscribe, subscribe
-
Constructor Details
-
MemLogManager
public MemLogManager()
-
-
Method Details
-
clear
public static void clear() -
exists
Description copied from interface:LogManager
Returnstrue
if a Log with thisname
exists. -
create
- Specified by:
create
in classAbstractLogManager
-
getSize
- Specified by:
getSize
in classAbstractLogManager
-
delete
Description copied from interface:LogManager
Tries to delete a Log. Returns true if successfully deleted, might not be possible depending on the implementation.- Specified by:
delete
in interfaceLogManager
- Overrides:
delete
in classAbstractLogManager
-
getLagPerPartition
Description copied from interface:LogManager
Returns the lag between consumergroup
and the producers for each partition. The result list is ordered, for instance index 0 is lag for partition 0.- Specified by:
getLagPerPartition
in interfaceLogManager
- Specified by:
getLagPerPartition
in classAbstractLogManager
-
toString
-
listAllNames
Description copied from interface:LogManager
Returns all the Log names. -
listConsumerGroups
Description copied from interface:LogManager
List the consumer groups for a Log. -
createAppender
- Specified by:
createAppender
in classAbstractLogManager
-
doCreateTailer
protected <M extends Externalizable> LogTailer<M> doCreateTailer(Collection<LogPartition> partitions, Name group, Codec<M> codec) - Specified by:
doCreateTailer
in classAbstractLogManager
-
doSubscribe
protected <M extends Externalizable> LogTailer<M> doSubscribe(Name group, Collection<Name> names, RebalanceListener listener, Codec<M> codec) - Specified by:
doSubscribe
in classAbstractLogManager
-