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) |
boolean |
delete(String name)
Try to delete a Log.
|
protected static void |
deleteQueueBasePath(Path basePath) |
protected <M extends Externalizable> |
doCreateTailer(Collection<LogPartition> partitions,
String group) |
protected <M extends Externalizable> |
doSubscribe(String group,
Collection<String> names,
RebalanceListener listener) |
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. |
List<String> |
listAll()
Returns all the Log names.
|
List<String> |
listConsumerGroups(String name)
List the consumer groups for a Log.
|
String |
toString() |
checkInvalidAssignment, close, createIfNotExists, createTailer, getAppender, subscribe, supportSubscribe
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createTailer, createTailer, getLag
protected 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)
public String getBasePath()
public boolean exists(String name)
LogManager
true
if a Log with this name
exists.public void create(String name, int size)
create
in class AbstractLogManager
public boolean delete(String name)
LogManager
delete
in interface LogManager
delete
in class AbstractLogManager
protected LogLag getLagForPartition(String name, int partition, String group)
public List<LogLag> getLagPerPartition(String name, String group)
LogManager
group
and the producers for each partition. The result list is ordered,
for instance index 0 is lag for partition 0.public List<String> listAll()
LogManager
public List<String> listConsumerGroups(String name)
LogManager
public <M extends Externalizable> CloseableLogAppender<M> createAppender(String name)
createAppender
in class AbstractLogManager
protected <M extends Externalizable> LogTailer<M> doCreateTailer(Collection<LogPartition> partitions, String group)
doCreateTailer
in class AbstractLogManager
protected <M extends Externalizable> LogTailer<M> doSubscribe(String group, Collection<String> names, RebalanceListener listener)
doSubscribe
in class AbstractLogManager
Copyright © 2018 Nuxeo. All rights reserved.