@Service
@ConditionalOnProperty(value="controllers.dblogging.enabled",
havingValue="true",
matchIfMissing=true)
public class ActivityTrackingController
extends Object
implements BackendController, Closeable
| Modifier and Type | Field and Description |
|---|---|
protected LinkedBlockingDeque<BatchOperation> |
eventQueue |
protected AtomicBoolean |
stopped |
| Constructor and Description |
|---|
ActivityTrackingController(JsonDB jsondb,
org.skife.jdbi.v2.DBI dbi,
io.fabric8.kubernetes.client.KubernetesClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupLogs() |
void |
close() |
protected io.syndesis.server.logging.jsondb.controller.PodLogMonitor |
createLogMonitor(io.fabric8.kubernetes.api.model.Pod pod) |
void |
deletePodLogState(String podName) |
PodLogState |
getPodLogState(String podName) |
int |
getRetention() |
Duration |
getRetentionTime() |
protected boolean |
isPodRunning(String name) |
protected io.fabric8.kubernetes.api.model.PodList |
listPods() |
void |
open() |
void |
setCleanUpInterval(String cleanUpInterval) |
void |
setPodLogState(String podName,
PodLogState state) |
void |
setRetention(int retention) |
void |
setRetentionTime(String retentionTime) |
void |
setStartupDelay(String startupDelay) |
void |
start() |
void |
stop() |
protected void |
watchLog(String podName,
Consumer<InputStream> handler,
String sinceTime) |
protected final LinkedBlockingDeque<BatchOperation> eventQueue
protected final AtomicBoolean stopped
@Autowired public ActivityTrackingController(JsonDB jsondb, org.skife.jdbi.v2.DBI dbi, io.fabric8.kubernetes.client.KubernetesClient client)
public void start()
start in interface BackendController@PostConstruct public void open()
public void cleanupLogs()
public void stop()
stop in interface BackendController@PreDestroy public void close()
close in interface Closeableclose in interface AutoCloseableprotected io.syndesis.server.logging.jsondb.controller.PodLogMonitor createLogMonitor(io.fabric8.kubernetes.api.model.Pod pod)
protected io.fabric8.kubernetes.api.model.PodList listPods()
protected boolean isPodRunning(String name)
protected void watchLog(String podName, Consumer<InputStream> handler, String sinceTime) throws IOException
IOExceptionpublic void deletePodLogState(String podName)
public void setPodLogState(String podName, PodLogState state) throws IOException
IOExceptionpublic PodLogState getPodLogState(String podName) throws IOException
IOException@Value(value="${controllers.dblogging.retention:50}")
public void setRetention(int retention)
@Value(value="${controllers.dblogging.retentionTime:1 day}")
public void setRetentionTime(String retentionTime)
@Value(value="${controllers.dblogging.cleanUpPeriod:15 minutes}")
public void setCleanUpInterval(String cleanUpInterval)
@Value(value="${controllers.dblogging.startupDelay:15 seconds}")
public void setStartupDelay(String startupDelay)
public int getRetention()
public Duration getRetentionTime()
Copyright © 2016–2020 Red Hat. All rights reserved.