this.manager.init(); return this;
this.manager.init(); return this;
this.manager.init(); return this;
this.manager.init(); return this;
/** * Returns read-only metadata on the connected cluster. * <p> * This includes the known nodes with their status as seen by the driver, * as well as the schema definitions. Since this return metadata on the * connected cluster, this method may trigger the creation of a connection * if none has been established yet (neither {@code init()} nor {@code connect()} * has been called yet). * * @return the cluster metadata. * * @throws NoHostAvailableException if the Cluster has not been initialized yet * and no host amongst the contact points can be reached. * @throws AuthenticationException if an authentication error occurs * while contacting the initial contact points. * @throws IllegalStateException if the Cluster was closed prior to calling * this method. This can occur either directly (through {@link #close()} or * {@link #closeAsync()}), or as a result of an error while initializing the * Cluster. */ public Metadata getMetadata() { manager.init(); return manager.metadata; }
/** * Returns read-only metadata on the connected cluster. * <p/> * This includes the known nodes with their status as seen by the driver, * as well as the schema definitions. Since this return metadata on the * connected cluster, this method may trigger the creation of a connection * if none has been established yet (neither {@code init()} nor {@code connect()} * has been called yet). * * @return the cluster metadata. * @throws NoHostAvailableException if the Cluster has not been initialized yet * and no host amongst the contact points can be reached. * @throws AuthenticationException if an authentication error occurs * while contacting the initial contact points. * @throws IllegalStateException if the Cluster was closed prior to calling * this method. This can occur either directly (through {@link #close()} or * {@link #closeAsync()}), or as a result of an error while initializing the * Cluster. */ public Metadata getMetadata() { manager.init(); return manager.metadata; }
/** * Returns read-only metadata on the connected cluster. * <p/> * This includes the known nodes with their status as seen by the driver, * as well as the schema definitions. Since this return metadata on the * connected cluster, this method may trigger the creation of a connection * if none has been established yet (neither {@code init()} nor {@code connect()} * has been called yet). * * @return the cluster metadata. * @throws NoHostAvailableException if the Cluster has not been initialized yet * and no host amongst the contact points can be reached. * @throws AuthenticationException if an authentication error occurs * while contacting the initial contact points. * @throws IllegalStateException if the Cluster was closed prior to calling * this method. This can occur either directly (through {@link #close()} or * {@link #closeAsync()}), or as a result of an error while initializing the * Cluster. */ public Metadata getMetadata() { manager.init(); return manager.metadata; }
/** * Returns read-only metadata on the connected cluster. * <p/> * This includes the known nodes with their status as seen by the driver, * as well as the schema definitions. Since this return metadata on the * connected cluster, this method may trigger the creation of a connection * if none has been established yet (neither {@code init()} nor {@code connect()} * has been called yet). * * @return the cluster metadata. * @throws NoHostAvailableException if the Cluster has not been initialized yet * and no host amongst the contact points can be reached. * @throws AuthenticationException if an authentication error occurs * while contacting the initial contact points. * @throws IllegalStateException if the Cluster was closed prior to calling * this method. This can occur either directly (through {@link #close()} or * {@link #closeAsync()}), or as a result of an error while initializing the * Cluster. */ public Metadata getMetadata() { manager.init(); return manager.metadata; }
/** * Initialize this Cluster instance. * * <p>This method creates an initial connection to one of the contact points used to construct the * {@code Cluster} instance. That connection is then used to populate the cluster {@link * Metadata}. * * <p>Calling this method is optional in the sense that any call to one of the {@code connect} * methods of this object will automatically trigger a call to this method beforehand. It is thus * only useful to call this method if for some reason you want to populate the metadata (or test * that at least one contact point can be reached) without creating a first {@code Session}. * * <p>Please note that this method only creates one control connection for gathering cluster * metadata. In particular, it doesn't create any connection pools. Those are created when a new * {@code Session} is created through {@code connect}. * * <p>This method has no effect if the cluster is already initialized. * * @return this {@code Cluster} object. * @throws NoHostAvailableException if no host amongst the contact points can be reached. * @throws AuthenticationException if an authentication error occurs while contacting the initial * contact points. * @throws IllegalStateException if the Cluster was closed prior to calling this method. This can * occur either directly (through {@link #close()} or {@link #closeAsync()}), or as a result * of an error while initializing the Cluster. */ public Cluster init() { this.manager.init(); return this; }
/** * Returns read-only metadata on the connected cluster. * * <p>This includes the known nodes with their status as seen by the driver, as well as the schema * definitions. Since this return metadata on the connected cluster, this method may trigger the * creation of a connection if none has been established yet (neither {@code init()} nor {@code * connect()} has been called yet). * * @return the cluster metadata. * @throws NoHostAvailableException if the Cluster has not been initialized yet and no host * amongst the contact points can be reached. * @throws AuthenticationException if an authentication error occurs while contacting the initial * contact points. * @throws IllegalStateException if the Cluster was closed prior to calling this method. This can * occur either directly (through {@link #close()} or {@link #closeAsync()}), or as a result * of an error while initializing the Cluster. */ public Metadata getMetadata() { manager.init(); return manager.metadata; }