@Override public boolean isClustered() { return entity.getParent() instanceof CassandraCluster; }
if (isClustered()) { entity.setConfig(CassandraNode.INITIAL_SEEDS, DependentConfiguration.attributeWhenReady(entity.getParent(), CassandraCluster.CURRENT_SEEDS)); } else { entity.setConfig(CassandraNode.INITIAL_SEEDS, MutableSet.<Entity>of(entity));
if (isClustered() && !isFirst && CassandraCluster.WAIT_FOR_FIRST) { long firstStartTime = Entities.submit(entity, DependentConfiguration.attributeWhenReady(getEntity().getParent(), CassandraCluster.FIRST_NODE_STARTED_TIME_UTC)).getUnchecked(); .execute(); if (isClustered() && isFirst) { ((EntityLocal)getEntity().getParent()).setAttribute(CassandraCluster.FIRST_NODE_STARTED_TIME_UTC, System.currentTimeMillis());