public class GridClientTopology extends Object
Constructor and Description |
---|
GridClientTopology(GridClientConfiguration cfg)
Creates topology instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addTopologyListener(GridClientTopologyListener lsnr)
Adds topology listener.
|
void |
fail(GridClientException cause)
Marks topology as failed.
|
boolean |
failed() |
GridClientNode |
node(UUID id)
Gets node from last saved topology snapshot by it's id.
|
void |
nodeFailed(UUID nodeId)
Updates topology when node that is expected to be in topology fails.
|
Collection<GridClientNodeImpl> |
nodes()
Gets full topology snapshot.
|
Collection<GridClientNode> |
nodes(Iterable<UUID> ids)
Gets a collection of nodes from last saved topology snapshot by their ids.
|
void |
removeTopologyListener(GridClientTopologyListener lsnr)
Removes topology listener.
|
void |
shutdown()
Shutdowns executor service that performs listener notification.
|
Collection<GridClientTopologyListener> |
topologyListeners()
Returns all added topology listeners.
|
GridClientNode |
updateNode(GridClientNodeImpl node)
Updates topology if cache enabled.
|
Collection<? extends GridClientNode> |
updateTopology(Collection<GridClientNodeImpl> nodeList)
Updates (if cache is enabled) the whole topology.
|
public GridClientTopology(GridClientConfiguration cfg)
cfg
- Client configuration.public void addTopologyListener(GridClientTopologyListener lsnr)
lsnr
- Topology listener.public void removeTopologyListener(GridClientTopologyListener lsnr)
lsnr
- Topology listener.public Collection<GridClientTopologyListener> topologyListeners()
public GridClientNode updateNode(GridClientNodeImpl node)
node
- Converted rest server response.public Collection<? extends GridClientNode> updateTopology(Collection<GridClientNodeImpl> nodeList)
nodeList
- Converted rest server response.public void fail(GridClientException cause)
cause
- Exception caused the failure.public void nodeFailed(UUID nodeId)
nodeId
- Node id for which node failed to be obtained.public GridClientNode node(UUID id) throws GridClientException
id
- Node id.null
if node was not found.GridClientException
- If topology is failed and no nodes available.public Collection<GridClientNode> nodes(Iterable<UUID> ids) throws GridClientException
ids
- Collection of ids for which nodes should be retrieved..GridClientException
- If topology is failed and no nodes available.public Collection<GridClientNodeImpl> nodes() throws GridClientException
GridClientException
- If topology is failed and no nodes available.public boolean failed()
public void shutdown()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017