Package org.infinispan.rest.distribution
Class NodeDistributionInfo
- java.lang.Object
-
- org.infinispan.rest.distribution.NodeDistributionInfo
-
- All Implemented Interfaces:
JsonSerialization
,NodeDataDistribution
@Immutable @ProtoTypeId(6002) public class NodeDistributionInfo extends Object implements JsonSerialization, NodeDataDistribution
Collect node's information and statistics of the local JVM. Contains information about the node name and address; the JVM statistics are memory used and available, all in bytes. We rely onClusterContainerStats
to retrieve the JVM values, so if the collector is disabled, we return -1.- Author:
- José Bolina
-
-
Constructor Summary
Constructors Constructor Description NodeDistributionInfo(String name, List<String> addresses, long memoryAvailable, long memoryUsed)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
addresses()
long
memoryAvailable()
long
memoryUsed()
String
name()
static NodeDistributionInfo
resolve(CacheManagerInfo manager, GlobalComponentRegistry registry)
Json
toJson()
-
-
-
Method Detail
-
name
@ProtoField(1) public String name()
- Specified by:
name
in interfaceNodeDataDistribution
-
addresses
@ProtoField(value=2, collectionImplementation=java.util.ArrayList.class) public List<String> addresses()
- Specified by:
addresses
in interfaceNodeDataDistribution
-
memoryAvailable
@ProtoField(value=3, defaultValue="0") public long memoryAvailable()
-
memoryUsed
@ProtoField(value=4, defaultValue="0") public long memoryUsed()
-
toJson
public Json toJson()
- Specified by:
toJson
in interfaceJsonSerialization
-
resolve
public static NodeDistributionInfo resolve(CacheManagerInfo manager, GlobalComponentRegistry registry)
-
-