@SuppressWarnings("unchecked") public <S> S getService(String serviceName) { return (S) node.nodeEngine.getService(serviceName); }
@SuppressWarnings("unchecked") public <S> S getService(String serviceName) { return (S) node.nodeEngine.getService(serviceName); }
private RingbufferService getRingbufferService() { return nodeEngine.getService(RingbufferService.SERVICE_NAME); }
private RingbufferService getRingbufferService() { return nodeEngine.getService(RingbufferService.SERVICE_NAME); }
private CacheService getCacheService() { return nodeEngine.getService(CacheService.SERVICE_NAME); } }
private TransactionalService getTransactionalService(String serviceName) { final Object service = nodeEngine.getService(serviceName); if (!(service instanceof TransactionalService)) { throw new IllegalArgumentException("Service[" + serviceName + "] is not transactional!"); } return (TransactionalService) service; }
private TransactionalService getTransactionalService(String serviceName) { final Object service = nodeEngine.getService(serviceName); if (!(service instanceof TransactionalService)) { throw new IllegalArgumentException("Service[" + serviceName + "] is not transactional!"); } return (TransactionalService) service; }
@Override public void run() { final EventPublishingService<Object, Object> service = eventService.nodeEngine.getService(serviceName); service.dispatchEvent(event, listener); }
public TrackableJobFuture(String name, String jobId, JobTracker jobTracker, NodeEngine nodeEngine, Collator collator) { super(nodeEngine, nodeEngine.getLogger(TrackableJobFuture.class)); this.name = name; this.jobId = jobId; this.jobTracker = jobTracker; this.collator = collator; this.mapReduceService = ((NodeEngineImpl) nodeEngine).getService(MapReduceService.SERVICE_NAME); }
public TrackableJobFuture(String name, String jobId, JobTracker jobTracker, NodeEngine nodeEngine, Collator collator) { super(nodeEngine, nodeEngine.getLogger(TrackableJobFuture.class)); this.name = name; this.jobId = jobId; this.jobTracker = jobTracker; this.collator = collator; this.mapReduceService = ((NodeEngineImpl) nodeEngine).getService(MapReduceService.SERVICE_NAME); }
void afterStart() { jetService = node.nodeEngine.getService(JetService.SERVICE_NAME); jetService.getJobCoordinationService().startScanningForJobs(); logger = node.getLogger(getClass().getName()); }
final Collection<Operation> createFragmentReplicationOperations(PartitionReplicationEvent event, ServiceNamespace ns, Collection<String> serviceNames) { assert !(ns instanceof NonFragmentedServiceNamespace) : ns + " should be used only for non-fragmented services!"; Collection<Operation> operations = emptySet(); NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); for (String serviceName : serviceNames) { FragmentedMigrationAwareService service = nodeEngine.getService(serviceName); assert service.isKnownServiceNamespace(ns) : ns + " should be known by " + service; operations = prepareAndAppendReplicationOperation(event, ns, service, serviceName, operations); } return operations; }
final Collection<Operation> createFragmentReplicationOperations(PartitionReplicationEvent event, ServiceNamespace ns, Collection<String> serviceNames) { assert !(ns instanceof NonFragmentedServiceNamespace) : ns + " should be used only for non-fragmented services!"; Collection<Operation> operations = emptySet(); NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); for (String serviceName : serviceNames) { FragmentedMigrationAwareService service = nodeEngine.getService(serviceName); assert service.isKnownServiceNamespace(ns) : ns + " should be known by " + service; operations = prepareAndAppendReplicationOperation(event, ns, service, serviceName, operations); } return operations; }
static JetInstance newJetInstanceImpl(JetConfig config, Function<Config, HazelcastInstance> newHzFn) { configureJetService(config); HazelcastInstanceImpl hzImpl = ((HazelcastInstanceProxy) newHzFn.apply(config.getHazelcastConfig())) .getOriginal(); JetService jetService = hzImpl.node.nodeEngine.getService(JetService.SERVICE_NAME); return jetService.getJetInstance(); }
public void destroyLocalDistributedObject(String serviceName, String name, boolean fireEvent) { ProxyRegistry registry = registries.get(serviceName); if (registry != null) { registry.destroyProxy(name, fireEvent); destroyedCounter.inc(); } RemoteService service = nodeEngine.getService(serviceName); service.destroyDistributedObject(name); String message = "DistributedObject[" + service + " -> " + name + "] has been destroyed!"; Throwable cause = new DistributedObjectDestroyedException(message); nodeEngine.getOperationParker().cancelParkedOperations(serviceName, name, cause); }
public void destroyLocalDistributedObject(String serviceName, String name, boolean fireEvent) { ProxyRegistry registry = registries.get(serviceName); if (registry != null) { registry.destroyProxy(name, fireEvent); destroyedCounter.inc(); } RemoteService service = nodeEngine.getService(serviceName); service.destroyDistributedObject(name); String message = "DistributedObject[" + service + " -> " + name + "] has been destroyed!"; Throwable cause = new DistributedObjectDestroyedException(message); nodeEngine.getOperationParker().cancelParkedOperations(serviceName, name, cause); }
private String getQuorumName(Operation op) { QuorumAwareService service; if (op instanceof ServiceNamespaceAware) { ServiceNamespace serviceNamespace = ((ServiceNamespaceAware) op).getServiceNamespace(); service = nodeEngine.getService(serviceNamespace.getServiceName()); } else { service = op.getService(); } String name = ((NamedOperation) op).getName(); return service.getQuorumName(name); }
private String getQuorumName(Operation op) { QuorumAwareService service; if (op instanceof ServiceNamespaceAware) { ServiceNamespace serviceNamespace = ((ServiceNamespaceAware) op).getServiceNamespace(); service = nodeEngine.getService(serviceNamespace.getServiceName()); } else { service = op.getService(); } String name = ((NamedOperation) op).getName(); return service.getQuorumName(name); }
private Operation createConsumerOperation(int partitionId, Queue<Accumulator> accumulators) { PublisherContext publisherContext = context.getPublisherContext(); NodeEngineImpl nodeEngine = (NodeEngineImpl) publisherContext.getNodeEngine(); Operation operation = new AccumulatorConsumerOperation(accumulators, MAX_PROCESSABLE_ACCUMULATOR_COUNT); operation .setNodeEngine(nodeEngine) .setCallerUuid(nodeEngine.getLocalMember().getUuid()) .setPartitionId(partitionId) .setValidateTarget(false) .setService(nodeEngine.getService(MapService.SERVICE_NAME)); return operation; }
private Operation createConsumerOperation(int partitionId, Queue<Accumulator> accumulators) { PublisherContext publisherContext = context.getPublisherContext(); NodeEngineImpl nodeEngine = (NodeEngineImpl) publisherContext.getNodeEngine(); Operation operation = new AccumulatorConsumerOperation(accumulators, MAX_PROCESSABLE_ACCUMULATOR_COUNT); operation .setNodeEngine(nodeEngine) .setCallerUuid(nodeEngine.getLocalMember().getUuid()) .setPartitionId(partitionId) .setValidateTarget(false) .setService(nodeEngine.getService(MapService.SERVICE_NAME)); return operation; }