private boolean checkCluster(DestinationName destination) { if (destination.isGlobal() || conf.getClusterName().equals(destination.getCluster())) { return true; } else { if (log.isDebugEnabled()) { log.debug("Destination [{}] does not belong to local cluster [{}]", destination.toString(), conf.getClusterName()); } return false; } }
CompletableFuture<Void> replCloseFuture = new CompletableFuture<>(); if (DestinationName.get(topic).isGlobal()) {
validateAdminOperationOnDestination(dn, authoritative); PersistentTopic topic = getTopicReference(dn); if (dn.isGlobal()) {
DestinationName dn = DestinationName.get(domain(), property, cluster, namespace, destination); validateAdminAccessOnProperty(dn.getProperty()); if (dn.isGlobal()) { log.error("[{}] Update partitioned-topic is forbidden on global namespace {}", clientAppId(), dn); throw new RestException(Status.FORBIDDEN, "Update forbidden on global namespace");
public boolean isActive() { if (DestinationName.get(topic).isGlobal()) { // No local consumers and no local producers return !subscriptions.isEmpty() || hasLocalProducers(); } return USAGE_COUNT_UPDATER.get(this) != 0 || !subscriptions.isEmpty(); }
@Override public CompletableFuture<Void> checkReplication() { DestinationName name = DestinationName.get(topic); if (!name.isGlobal()) { return CompletableFuture.completedFuture(null);