@Deprecated public class CuratorInventoryManager<ContainerClass,InventoryClass> extends Object
HttpServerInventoryView
for segment discovery.
An InventoryManager watches updates to inventory on Zookeeper (or some other discovery-like service publishing
system). It is built up on two object types: containers and inventory objects.
The logic of the InventoryManager just maintains a local cache of the containers and inventory it sees on ZK. It
provides methods for getting at the container objects, which house the actual individual pieces of inventory.
A Strategy is provided to the constructor of an Inventory manager, this strategy provides all of the
object-specific logic to serialize, deserialize, compose and alter the container and inventory objects.Constructor and Description |
---|
CuratorInventoryManager(org.apache.curator.framework.CuratorFramework curatorFramework,
InventoryManagerConfig config,
ExecutorService exec,
CuratorInventoryManagerStrategy<ContainerClass,InventoryClass> strategy)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
InventoryManagerConfig |
getConfig()
Deprecated.
|
Collection<ContainerClass> |
getInventory()
Deprecated.
|
ContainerClass |
getInventoryValue(String containerKey)
Deprecated.
|
void |
start()
Deprecated.
|
void |
stop()
Deprecated.
|
public CuratorInventoryManager(org.apache.curator.framework.CuratorFramework curatorFramework, InventoryManagerConfig config, ExecutorService exec, CuratorInventoryManagerStrategy<ContainerClass,InventoryClass> strategy)
public void stop() throws IOException
IOException
public InventoryManagerConfig getConfig()
public ContainerClass getInventoryValue(String containerKey)
public Collection<ContainerClass> getInventory()
Copyright © 2011–2018. All rights reserved.