Java Code Examples for org.elasticsearch.cluster.ClusterState#Custom

The following examples show how to use org.elasticsearch.cluster.ClusterState#Custom . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RoutingNodes.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
public ImmutableOpenMap<String, ClusterState.Custom> customs() {
    return this.customs;
}
 
Example 2
Source File: RoutingNodes.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
public <T extends ClusterState.Custom> T custom(String type) {
    return (T) customs.get(type);
}
 
Example 3
Source File: RoutingAllocation.java    From crate with Apache License 2.0 4 votes vote down vote up
public <T extends ClusterState.Custom> T custom(String key) {
    return (T)customs.get(key);
}
 
Example 4
Source File: RoutingAllocation.java    From crate with Apache License 2.0 4 votes vote down vote up
public ImmutableOpenMap<String, ClusterState.Custom> getCustoms() {
    return customs;
}
 
Example 5
Source File: ClusterPlugin.java    From crate with Apache License 2.0 2 votes vote down vote up
/**
 * Returns a map of {@link ClusterState.Custom} supplier that should be invoked to initialize the initial clusterstate.
 * This allows custom clusterstate extensions to be always present and prevents invariants where clusterstates are published
 * but customs are not initialized.
 *
 * TODO: Remove this whole concept of InitialClusterStateCustomSupplier, it's not used anymore
 */
default Map<String, Supplier<ClusterState.Custom>> getInitialClusterStateCustomSupplier() {
    return Collections.emptyMap();
}