Groovy Documentation

org.linkedin.glu.orchestration.engine.fabric
[Groovy] Interface FabricService


interface FabricService

This service will manage fabrics

Authors:
ypujante@linkedin.com


Method Summary
Fabric findFabric(java.lang.String fabricName)

@return the fabric or null

java.util.Map getAgents()

@return a map where the key is the agent name and the value is the fabric name the agent belongs (as defined in ZooKeeper)

java.util.Collection getFabrics()

@return a collection of all the fabrics known by the service (cached list)

boolean isConnected(java.lang.String fabricName)

@return true if the fabric is connected

java.util.Collection listFabricNames()

@return the list of fabric names

void resetCache()

resets the fabrics cache which will force the connection to ZooKeeper to be dropped.

void setAgentFabric(java.lang.String agentName, java.lang.String fabricName)

Sets the fabric for the given agent: write it in ZooKeeper and configure the agent as well.

java.lang.Object withZkClient(java.lang.String fabricName, groovy.lang.Closure closure)

Executes the closure with the ZooKeeper connection (instance of org.linkedin.zookeeper.client.IZKClient) associated to the fabric

 

Method Detail

findFabric

Fabric findFabric(java.lang.String fabricName)
Returns:
the fabric or null


getAgents

java.util.Map getAgents()
Returns:
a map where the key is the agent name and the value is the fabric name the agent belongs (as defined in ZooKeeper)


getFabrics

java.util.Collection getFabrics()
Returns:
a collection of all the fabrics known by the service (cached list)


isConnected

boolean isConnected(java.lang.String fabricName)
Returns:
true if the fabric is connected


listFabricNames

java.util.Collection listFabricNames()
Returns:
the list of fabric names


resetCache

void resetCache()
resets the fabrics cache which will force the connection to ZooKeeper to be dropped.


setAgentFabric

void setAgentFabric(java.lang.String agentName, java.lang.String fabricName)
Sets the fabric for the given agent: write it in ZooKeeper and configure the agent as well.


withZkClient

java.lang.Object withZkClient(java.lang.String fabricName, groovy.lang.Closure closure)
Executes the closure with the ZooKeeper connection (instance of org.linkedin.zookeeper.client.IZKClient) associated to the fabric
Returns:
whatever the closure returns


 

Groovy Documentation