public class ZkWorker extends Object implements Closeable
Constructor and Description |
---|
ZkWorker(Worker worker,
org.apache.curator.framework.recipes.cache.PathChildrenCache statusCache,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(org.apache.curator.framework.recipes.cache.PathChildrenCacheListener listener) |
void |
close() |
Set<String> |
getAvailabilityGroups() |
int |
getCurrCapacityUsed() |
org.joda.time.DateTime |
getLastCompletedTaskTime() |
Collection<String> |
getRunningTaskIds() |
Map<String,TaskAnnouncement> |
getRunningTasks() |
Worker |
getWorker() |
boolean |
isRunningTask(String taskId) |
boolean |
isValidVersion(String minVersion) |
void |
setLastCompletedTaskTime(org.joda.time.DateTime completedTaskTime) |
void |
setWorker(Worker newWorker) |
void |
start() |
ImmutableZkWorker |
toImmutable() |
String |
toString() |
public ZkWorker(Worker worker, org.apache.curator.framework.recipes.cache.PathChildrenCache statusCache, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
public void addListener(org.apache.curator.framework.recipes.cache.PathChildrenCacheListener listener)
public Worker getWorker()
public Collection<String> getRunningTaskIds()
public Map<String,TaskAnnouncement> getRunningTasks()
public int getCurrCapacityUsed()
public org.joda.time.DateTime getLastCompletedTaskTime()
public boolean isRunningTask(String taskId)
public boolean isValidVersion(String minVersion)
public void setWorker(Worker newWorker)
public void setLastCompletedTaskTime(org.joda.time.DateTime completedTaskTime)
public ImmutableZkWorker toImmutable()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2011–2015. All rights reserved.