public abstract class ServerInventoryView<InventoryType> extends Object implements ServerView, InventoryView
ServerView.BaseSegmentCallback, ServerView.CallbackAction, ServerView.SegmentCallback, ServerView.ServerCallback
Constructor and Description |
---|
ServerInventoryView(com.metamx.emitter.EmittingLogger log,
String announcementsPath,
String inventoryPath,
org.apache.curator.framework.CuratorFramework curator,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper,
com.fasterxml.jackson.core.type.TypeReference<InventoryType> typeReference) |
public ServerInventoryView(com.metamx.emitter.EmittingLogger log, String announcementsPath, String inventoryPath, org.apache.curator.framework.CuratorFramework curator, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, com.fasterxml.jackson.core.type.TypeReference<InventoryType> typeReference)
public void stop() throws IOException
IOException
public boolean isStarted()
public DruidServer getInventoryValue(String containerKey)
getInventoryValue
in interface InventoryView
public Iterable<DruidServer> getInventory()
getInventory
in interface InventoryView
public void registerServerCallback(Executor exec, ServerView.ServerCallback callback)
registerServerCallback
in interface ServerView
public void registerSegmentCallback(Executor exec, ServerView.SegmentCallback callback)
registerSegmentCallback
in interface ServerView
public InventoryManagerConfig getInventoryManagerConfig()
protected void runSegmentCallbacks(com.google.common.base.Function<ServerView.SegmentCallback,ServerView.CallbackAction> fn)
protected void runServerCallbacks(DruidServer server)
protected void addSingleInventory(DruidServer container, io.druid.timeline.DataSegment inventory)
protected void removeSingleInventory(DruidServer container, String inventoryKey)
protected abstract DruidServer addInnerInventory(DruidServer container, String inventoryKey, InventoryType inventory)
protected abstract DruidServer updateInnerInventory(DruidServer container, String inventoryKey, InventoryType inventory)
protected abstract DruidServer removeInnerInventory(DruidServer container, String inventoryKey)
Copyright © 2011–2015. All rights reserved.