public class ChronicleLogManager extends AbstractLogManager
| Modifier and Type | Field and Description |
|---|---|
protected Path |
basePath |
protected ChronicleRetentionDuration |
retention |
appenders, tailers, tailersAssignments| Constructor and Description |
|---|
ChronicleLogManager(Path basePath) |
ChronicleLogManager(Path basePath,
String retentionDuration)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
create(String name,
int size) |
<M extends Externalizable> |
createAppender(String name,
Codec<M> codec) |
boolean |
delete(String name)
Tries to delete a Log.
|
protected static void |
deleteQueueBasePath(Path basePath) |
protected <M extends Externalizable> |
doCreateTailer(Collection<LogPartition> partitions,
String group,
Codec<M> codec) |
protected <M extends Externalizable> |
doSubscribe(String group,
Collection<String> names,
RebalanceListener listener,
Codec<M> codec) |
boolean |
exists(String name)
Returns
true if a Log with this name exists. |
String |
getBasePath() |
protected LogLag |
getLagForPartition(String name,
int partition,
String group) |
List<LogLag> |
getLagPerPartition(String name,
String group)
Returns the lag between consumer
group and the producers for each partition. |
protected int |
getSize(String name) |
protected static boolean |
isChronicleLogFile(Path path) |
List<String> |
listAll()
Returns all the Log names.
|
List<String> |
listConsumerGroups(String name)
List the consumer groups for a Log.
Note that for Kafka it returns only consumers that use the subscribe API. |
String |
toString() |
checkInvalidAssignment, checkInvalidCodec, close, createIfNotExists, createTailer, getAppender, getLatencyPerPartition, guessCodec, sameCodec, size, subscribe, supportSubscribeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateTailer, createTailer, createTailer, createTailer, createTailer, getAppender, getLag, getLatency, getLatency, getLatencyPerPartition, subscribeprotected final ChronicleRetentionDuration retention
public ChronicleLogManager(Path basePath)
public ChronicleLogManager(Path basePath, String retentionDuration)
basePath - the base path.retentionDuration - the retention duration. It is the time period the queue files will be retained. Once the
retention duration expires, the older files are candidates for being purged. The property can be
expressed as: 15s, 30m, 1h, 4d ... (where 's' is expressing a duration in seconds, 'm' in minutes,'h'
in hours and 'd' in days)protected static void deleteQueueBasePath(Path basePath)
protected static boolean isChronicleLogFile(Path path)
public String getBasePath()
public boolean exists(String name)
LogManagertrue if a Log with this name exists.public void create(String name, int size)
create in class AbstractLogManagerprotected int getSize(String name)
getSize in class AbstractLogManagerpublic boolean delete(String name)
LogManagerdelete in interface LogManagerdelete in class AbstractLogManagerprotected LogLag getLagForPartition(String name, int partition, String group)
public List<LogLag> getLagPerPartition(String name, String group)
LogManagergroup and the producers for each partition. The result list is ordered,
for instance index 0 is lag for partition 0.public List<String> listAll()
LogManagerpublic List<String> listConsumerGroups(String name)
LogManagerpublic <M extends Externalizable> CloseableLogAppender<M> createAppender(String name, Codec<M> codec)
createAppender in class AbstractLogManagerprotected <M extends Externalizable> LogTailer<M> doCreateTailer(Collection<LogPartition> partitions, String group, Codec<M> codec)
doCreateTailer in class AbstractLogManagerprotected <M extends Externalizable> LogTailer<M> doSubscribe(String group, Collection<String> names, RebalanceListener listener, Codec<M> codec)
doSubscribe in class AbstractLogManagerCopyright © 2019 Nuxeo. All rights reserved.