Cluster implements Cloneable, PropertyHolder { public boolean isEmpty() { return stripes.isEmpty() || getNodes().isEmpty(); } Cluster(List<Stripe> stripes);  Cluster(Stripe... stripes); @Override Scope getScope(); @Override String getName(); @Override UID getUID(); Cluster setUID(UID uid); OptionalConfig<String> getSecurityAuthc(); OptionalConfig<Boolean> getSecuritySslTls(); OptionalConfig<Boolean> getSecurityWhitelist(); FailoverPriority getFailoverPriority(); OptionalConfig<Measure<TimeUnit>> getClientReconnectWindow(); OptionalConfig<Measure<TimeUnit>> getClientLeaseDuration(); OptionalConfig<Map<String, Measure<MemoryUnit>>> getOffheapResources(); Cluster setSecurityAuthc(String securityAuthc); Cluster setSecuritySslTls(Boolean securitySslTls); Cluster setSecurityWhitelist(Boolean securityWhitelist); Cluster setFailoverPriority(FailoverPriority failoverPriority); Cluster setClientReconnectWindow(long clientReconnectWindow, TimeUnit timeUnit); Cluster setClientReconnectWindow(long clientReconnectWindow, java.util.concurrent.TimeUnit jdkUnit); Cluster setClientReconnectWindow(Measure<TimeUnit> measure); Cluster setClientLeaseDuration(long clientLeaseDuration, TimeUnit timeUnit); Cluster setClientLeaseDuration(long clientLeaseDuration, java.util.concurrent.TimeUnit jdkUnit); Cluster setClientLeaseDuration(Measure<TimeUnit> measure); Cluster putOffheapResource(String name, long quantity, MemoryUnit memoryUnit); Cluster putOffheapResource(String name, Measure<MemoryUnit> measure); Cluster putOffheapResources(Map<String, Measure<MemoryUnit>> offheapResources); Cluster setOffheapResources(Map<String, Measure<MemoryUnit>> offheapResources); Cluster removeOffheapResource(String key); Cluster unsetOffheapResources(); List<Stripe> getStripes(); Cluster setStripes(List<Stripe> stripes); Cluster addStripe(Stripe stripe); Cluster setName(String name); boolean isEmpty(); Optional<Node> getSingleNode(); Optional<Stripe> getSingleStripe(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); String toShapeString(); Collection<Endpoint> getInternalEndpoints(); Collection<Endpoint> getEndpoints(InetSocketAddress initiator); Collection<Endpoint> getSimilarEndpoints(Endpoint initiator); boolean containsNode(UID nodeUID); boolean containsNode(String nodeName); @Override @SuppressWarnings("MethodDoesntCallSuperMethod") @SuppressFBWarnings("CN_IDIOM_NO_SUPER_CALL") Cluster clone(); boolean removeStripe(Stripe stripe); boolean removeStripe(UID stripeUID); boolean removeNode(UID uid); Optional<Node> getNode(UID nodeUID); Optional<Node> getNodeByName(String name); Optional<Stripe> getStripe(UID stripeUID); Optional<Stripe> getStripe(int stripeId); OptionalInt getStripeId(UID stripeUID); OptionalInt getStripeIdByNode(UID nodeUID); Optional<Stripe> getStripeByNode(UID nodeUID); Optional<Stripe> getStripeByNodeName(String nodeName); int getNodeCount(); int getStripeCount(); Collection<Node> getNodes(); void forEach(BiConsumer<Integer, Node> consumer); @Override Properties toProperties(boolean expanded, boolean includeDefaultValues, boolean includeHiddenSettings, Version version); @Override Stream<? extends PropertyHolder> descendants(); Collection<String> getDataDirNames(); Cluster removeStripes(); OptionalConfig<LockContext> getConfigurationLockContext(); Cluster setConfigurationLockContext(LockContext lockContext); Optional<Stripe> inSameStripe(UID... nodeUIDs); UID newUID(); UID newUID(Random random);  }
@Test public void test_isEmpty() { assertFalse(cluster.isEmpty()); assertTrue(new Cluster().isEmpty()); assertTrue(new Cluster(new Stripe()).isEmpty()); }