kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | a5bd5b316c2fe824562cdd7b10485289255906cb59181ee5ad5bcaeb4dd6f262 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2015-04-17 14:39 +02:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2015-04-17 14:39 +02:00 |
| Parents | acbf45c5758c |
1 file changed
modified driver-core/src/main/java/com/datastax/driver/core/Host.java +13 −0
| @@ -191,6 +191,19 @@ | ||
| 191 | 191 | return state == State.UP || state == State.SUSPECT; |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | + /** | |
| 195 | + * Returns a description of the host's state, as seen by the driver. | |
| 196 | + * <p> | |
| 197 | + * This is exposed for debugging purposes only; the format of this string might | |
| 198 | + * change between driver versions, so clients should not make any assumptions | |
| 199 | + * about it. | |
| 200 | + * | |
| 201 | + * @return a description of the host's state. | |
| 202 | + */ | |
| 203 | + public String getState() { | |
| 204 | + return state.name(); | |
| 205 | + } | |
| 206 | + | |
| 194 | 207 | /** |
| 195 | 208 | * Returns a {@code ListenableFuture} representing the completion of the first |
| 196 | 209 | * reconnection attempt after a node has been suspected. |