public interface Metadata
Updates to this object are guaranteed to be atomic: the node list, schema, and token metadata are immutable, and will always be consistent for a given metadata instance. The node instances are the only mutable objects in the hierarchy, and some of their fields will be modified dynamically (in particular the node state).
Session.getMetadata()
Modifier and Type | Method and Description |
---|---|
default Optional<? extends KeyspaceMetadata> |
getKeyspace(CqlIdentifier keyspaceId) |
default Optional<? extends KeyspaceMetadata> |
getKeyspace(String keyspaceName)
Shortcut for
getKeyspace(CqlIdentifier.fromCql(keyspaceName)) . |
Map<CqlIdentifier,? extends KeyspaceMetadata> |
getKeyspaces()
The keyspaces defined in this cluster.
|
Map<InetSocketAddress,Node> |
getNodes()
The nodes known to the driver, indexed by the address that it uses to connect to them.
|
Optional<? extends TokenMap> |
getTokenMap()
The token map for this cluster.
|
@NonNull Map<InetSocketAddress,Node> getNodes()
@NonNull Map<CqlIdentifier,? extends KeyspaceMetadata> getKeyspaces()
Note that schema metadata can be disabled or restricted to a subset of keyspaces, therefore this map might be empty or incomplete.
@NonNull default Optional<? extends KeyspaceMetadata> getKeyspace(@NonNull CqlIdentifier keyspaceId)
@NonNull default Optional<? extends KeyspaceMetadata> getKeyspace(@NonNull String keyspaceName)
getKeyspace(CqlIdentifier.fromCql(keyspaceName))
.Copyright © 2017–2018. All rights reserved.