public abstract class Archiver<E> extends Object implements Runnable
| Modifier | Constructor and Description |
|---|---|
protected |
Archiver(String id,
int maxWorkQueueSize,
Duration maxPurgeInterval,
Duration gracePeriod)
Instantiates a new archiver.
|
| Modifier and Type | Method and Description |
|---|---|
void |
archive(E data) |
Duration |
availabilityETA(Instant instant)
Returns an estimation on how long it takes for all data that arrived before a certain instant will have become
available in the data store.
|
Duration |
availabilityETAOnLocalNode(Instant instant)
Returns an estimation on how long it takes for all data that arrived before a certain instant will have become
available in the data store.
|
Duration |
getGracePeriod() |
String |
getId() |
Duration |
getMaxPurgeInterval() |
int |
getMaxWorkQueueSize() |
void |
run() |
void |
setGracePeriod(Duration gracePeriod) |
void |
setMaxPurgeInterval(Duration maxPurgeInterval) |
void |
setMaxWorkQueueSize(int maxWorkQueueSize) |
void |
stop() |
protected abstract void |
store(List<E> batch) |
protected Archiver(String id, int maxWorkQueueSize, Duration maxPurgeInterval, Duration gracePeriod)
id - A unique identifier for this archiver.maxWorkQueueSize - Do not add more than this amount of queries in a batch.maxPurgeInterval - Do not delay longer than this amount before storing data in the database.gracePeriod - Maximum amount of milliseconds to wait for 'more' work to arrive, before committing the batch.public void archive(E data)
public String getId()
public void stop()
public Duration availabilityETA(Instant instant)
availabilityETAOnLocalNode(Instant).instant - The timestamp of the data that should be available (cannot be null).public Duration availabilityETAOnLocalNode(Instant instant)
availabilityETA(Instant).instant - The timestamp of the data that should be available (cannot be null).public int getMaxWorkQueueSize()
public void setMaxWorkQueueSize(int maxWorkQueueSize)
public Duration getMaxPurgeInterval()
public void setMaxPurgeInterval(Duration maxPurgeInterval)
public Duration getGracePeriod()
public void setGracePeriod(Duration gracePeriod)
Copyright © 2003–2020 Ignite Realtime. All rights reserved.