@Override protected Address getAddress() { return nodeEngine.getThisAddress(); }
@Override protected Address getAddress() { return nodeEngine.getThisAddress(); }
public final Address getLocalAddress() { return nodeEngine.getThisAddress(); }
public void onPartitionMigrate(MigrationInfo migrationInfo) { operationParker.onPartitionMigrate(getThisAddress(), migrationInfo); }
private void createAndPublishEvent(Collection<Member> memberList, boolean presence) { QuorumEvent quorumEvent = new QuorumEvent(nodeEngine.getThisAddress(), size, memberList, presence); eventService.publishEvent(QuorumServiceImpl.SERVICE_NAME, quorumName, quorumEvent, quorumEvent.hashCode()); }
@Override protected InvocationBuilder getInvocationBuilder(Operation operation) { return nodeEngine.getOperationService().createInvocationBuilder( // SnowcastConstants.SERVICE_NAME, operation, nodeEngine.getThisAddress()); }
@Override protected InvocationBuilder getInvocationBuilder(Operation op) { InternalOperationService operationService = nodeEngine.getOperationService(); return operationService.createInvocationBuilder(CacheService.SERVICE_NAME, op, nodeEngine.getThisAddress()); }
/** Returns {@code true} if the subscriber of the registration is this node */ boolean isLocal(EventRegistration reg) { return nodeEngine.getThisAddress().equals(reg.getSubscriber()); }
/** Returns {@code true} if the subscriber of the registration is this node */ boolean isLocal(EventRegistration reg) { return nodeEngine.getThisAddress().equals(reg.getSubscriber()); }
@Override protected InvocationBuilder getInvocationBuilder(Operation op) { return nodeEngine.getOperationService().createInvocationBuilder(getServiceName(), op, nodeEngine.getThisAddress()); }
public void sendPartitionLostEvent(int partitionId, int lostReplicaIndex) { final IPartitionLostEvent event = new IPartitionLostEvent(partitionId, lostReplicaIndex, nodeEngine.getThisAddress()); final InternalPartitionLostEventPublisher publisher = new InternalPartitionLostEventPublisher(nodeEngine, event); nodeEngine.getExecutionService().execute(SYSTEM_EXECUTOR, publisher); }
public void sendPartitionLostEvent(int partitionId, int lostReplicaIndex) { final IPartitionLostEvent event = new IPartitionLostEvent(partitionId, lostReplicaIndex, nodeEngine.getThisAddress()); final InternalPartitionLostEventPublisher publisher = new InternalPartitionLostEventPublisher(nodeEngine, event); nodeEngine.getExecutionService().execute(SYSTEM_EXECUTOR, publisher); }
@Override protected Object call() throws Exception { InternalOperationService operationService = nodeEngine.getOperationService(); CacheDestroyOperation cacheDestroyOperation = new CacheDestroyOperation(parameters.name); InvocationBuilder builder = operationService.createInvocationBuilder(CacheService.SERVICE_NAME, cacheDestroyOperation, nodeEngine.getThisAddress()); return builder.invoke().join(); }
public boolean handleRegistration(Registration reg) { if (nodeEngine.getThisAddress().equals(reg.getSubscriber())) { return false; } EventServiceSegment segment = getSegment(reg.getServiceName(), true); return segment.addRegistration(reg.getTopic(), reg); }
public boolean handleRegistration(Registration reg) { if (nodeEngine.getThisAddress().equals(reg.getSubscriber())) { return false; } EventServiceSegment segment = getSegment(reg.getServiceName(), true); return segment.addRegistration(reg.getTopic(), reg); }
@Override public <T> T getService(String serviceName) { T service = serviceManager.getService(serviceName); if (service == null) { if (isRunning()) { throw new HazelcastException("Service with name '" + serviceName + "' not found!", new ServiceNotFoundException("Service with name '" + serviceName + "' not found!")); } else { throw new RetryableHazelcastException("HazelcastInstance[" + getThisAddress() + "] is not active!"); } } return service; }
@Override public <T> T getService(String serviceName) { T service = serviceManager.getService(serviceName); if (service == null) { if (isRunning()) { throw new HazelcastException("Service with name '" + serviceName + "' not found!", new ServiceNotFoundException("Service with name '" + serviceName + "' not found!")); } else { throw new RetryableHazelcastException("HazelcastInstance[" + getThisAddress() + "] is not active!"); } } return service; }
public JobSupervisor createJobSupervisor(JobTaskConfiguration configuration) { // Job might already be cancelled (due to async processing) NodeJobTracker jobTracker = (NodeJobTracker) createDistributedObject(configuration.getName()); if (jobTracker.unregisterJobSupervisorCancellation(configuration.getJobId())) { return null; } JobSupervisorKey key = new JobSupervisorKey(configuration.getName(), configuration.getJobId()); boolean ownerNode = nodeEngine.getThisAddress().equals(configuration.getJobOwner()); JobSupervisor jobSupervisor = new JobSupervisor(configuration, jobTracker, ownerNode, this); JobSupervisor oldSupervisor = jobSupervisors.putIfAbsent(key, jobSupervisor); return oldSupervisor != null ? oldSupervisor : jobSupervisor; }
public JobSupervisor createJobSupervisor(JobTaskConfiguration configuration) { // Job might already be cancelled (due to async processing) NodeJobTracker jobTracker = (NodeJobTracker) createDistributedObject(configuration.getName()); if (jobTracker.unregisterJobSupervisorCancellation(configuration.getJobId())) { return null; } JobSupervisorKey key = new JobSupervisorKey(configuration.getName(), configuration.getJobId()); boolean ownerNode = nodeEngine.getThisAddress().equals(configuration.getJobOwner()); JobSupervisor jobSupervisor = new JobSupervisor(configuration, jobTracker, ownerNode, this); JobSupervisor oldSupervisor = jobSupervisors.putIfAbsent(key, jobSupervisor); return oldSupervisor != null ? oldSupervisor : jobSupervisor; }
@Override public void afterRun() throws Exception { if (validationFailure != null || !sync || getCallId() == 0 || originalCaller == null) { return; } NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); long callId = getCallId(); OperationServiceImpl operationService = (OperationServiceImpl) nodeEngine.getOperationService(); if (nodeEngine.getThisAddress().equals(originalCaller)) { operationService.getBackupHandler().notifyBackupComplete(callId); } else { operationService.getOutboundResponseHandler().sendBackupAck(originalCaller, callId, backupOp.isUrgent()); } }