use of com.cloudant.client.api.model.Membership in project java-cloudant by cloudant.
the class CloudantClientTests method cookieTest.
@Test
@RequiresCloudant
public void cookieTest() {
Membership membership = account.getMembership();
assertNotNull(membership);
}
use of com.cloudant.client.api.model.Membership in project java-cloudant by cloudant.
the class CloudantClientTests method membership.
@Test
@RequiresCloudant
public void membership() {
Membership mship = account.getMembership();
assertNotNull(mship);
assertNotNull(mship.getClusterNodes());
assertNotNull(mship.getClusterNodes().hasNext());
assertNotNull(mship.getAllNodes());
assertNotNull(mship.getAllNodes().hasNext());
}
use of com.cloudant.client.api.model.Membership in project java-cloudant by cloudant.
the class CloudantClient method getMembership.
/**
* Get the list of all nodes and the list of active nodes in the cluster.
*
* @return Membership object encapsulating lists of all nodes and the cluster nodes
* @see <a
* href="https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-_membership-">
* _membership</a>
*/
public Membership getMembership() {
URI uri = new URIBase(getBaseUri()).path("_membership").build();
Membership membership = couchDbClient.get(uri, Membership.class);
return membership;
}
Aggregations