private void checkAccessibleOwner() { if (handler.isAssignedToPartition()) { if (partitionLost.get()) { throw new IllegalStateException("Partition " + handler.getPartitionId() + ", holding this scheduled task" + " was lost along with all backups."); } } else { if (memberLost.get()) { throw new IllegalStateException("Member with address: " + handler.getAddress() + ", holding this scheduled task" + " is not part of this cluster."); } } }
private void checkAccessibleOwner() { if (handler.isAssignedToPartition()) { if (partitionLost.get()) { throw new IllegalStateException("Partition " + handler.getPartitionId() + ", holding this scheduled task" + " was lost along with all backups."); } } else { if (memberLost.get()) { throw new IllegalStateException("Member with address: " + handler.getAddress() + ", holding this scheduled task" + " is not part of this cluster."); } } }
private <T> InternalCompletableFuture<T> invoke(Operation op) { if (handler.isAssignedToPartition()) { op.setPartitionId(handler.getPartitionId()); return invokeOnPartition(op); } else { return invokeOnAddress(op, handler.getAddress()); } }
private <T> InternalCompletableFuture<T> invoke(Operation op) { if (handler.isAssignedToPartition()) { op.setPartitionId(handler.getPartitionId()); return invokeOnPartition(op); } else { return invokeOnAddress(op, handler.getAddress()); } }
void notifyPartitionLost(PartitionLostEvent event) { ScheduledTaskHandler handler = this.handler; if (handler == null) { // Already disposed future return; } int durability = instance.getConfig().getScheduledExecutorConfig(handler.getSchedulerName()).getDurability(); if (handler.isAssignedToPartition() && handler.getPartitionId() == event.getPartitionId() && event.getLostBackupCount() >= durability) { this.partitionLost.set(true); } }
void notifyPartitionLost(PartitionLostEvent event) { ScheduledTaskHandler handler = this.handler; if (handler == null) { // Already disposed future return; } int durability = instance.getConfig().getScheduledExecutorConfig(handler.getSchedulerName()).getDurability(); if (handler.isAssignedToPartition() && handler.getPartitionId() == event.getPartitionId() && event.getLostBackupCount() >= durability) { this.partitionLost.set(true); } }