org.elasticsearch.cluster
Class ClusterState
java.lang.Object
org.elasticsearch.cluster.ClusterState
- All Implemented Interfaces:
- ToXContent
public class ClusterState
- extends Object
- implements ToXContent
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
customFactories
public static Map<String,ClusterState.Custom.Factory> customFactories
ClusterState
public ClusterState(long version,
ClusterState state)
ClusterState
public ClusterState(long version,
MetaData metaData,
RoutingTable routingTable,
DiscoveryNodes nodes,
ClusterBlocks blocks,
AllocationExplanation allocationExplanation,
com.google.common.collect.ImmutableMap<String,ClusterState.Custom> customs)
registerFactory
public static void registerFactory(String type,
ClusterState.Custom.Factory factory)
- Register a custom index meta data factory. Make sure to call it from a static block.
lookupFactory
@Nullable
public static <T extends ClusterState.Custom> ClusterState.Custom.Factory<T> lookupFactory(String type)
lookupFactorySafe
public static <T extends ClusterState.Custom> ClusterState.Custom.Factory<T> lookupFactorySafe(String type)
throws ElasticSearchIllegalArgumentException
- Throws:
ElasticSearchIllegalArgumentException
version
public long version()
getVersion
public long getVersion()
nodes
public DiscoveryNodes nodes()
getNodes
public DiscoveryNodes getNodes()
metaData
public MetaData metaData()
getMetaData
public MetaData getMetaData()
routingTable
public RoutingTable routingTable()
getRoutingTable
public RoutingTable getRoutingTable()
routingNodes
public RoutingNodes routingNodes()
getRoutingNodes
public RoutingNodes getRoutingNodes()
blocks
public ClusterBlocks blocks()
getBlocks
public ClusterBlocks getBlocks()
allocationExplanation
public AllocationExplanation allocationExplanation()
getAllocationExplanation
public AllocationExplanation getAllocationExplanation()
customs
public com.google.common.collect.ImmutableMap<String,ClusterState.Custom> customs()
getCustoms
public com.google.common.collect.ImmutableMap<String,ClusterState.Custom> getCustoms()
readOnlyRoutingNodes
public RoutingNodes readOnlyRoutingNodes()
- Returns a built (on demand) routing nodes view of the routing table. NOTE, the routing nodes
are mutable, use them just for read operations
settingsFilter
public ClusterState settingsFilter(SettingsFilter settingsFilter)
toXContent
public XContentBuilder toXContent(XContentBuilder builder,
ToXContent.Params params)
throws IOException
- Specified by:
toXContent
in interface ToXContent
- Throws:
IOException
builder
public static ClusterState.Builder builder()
newClusterStateBuilder
public static ClusterState.Builder newClusterStateBuilder()
Copyright © 2009-2012. All Rights Reserved.