com.hazelcast.instance.Node.getNodeEngine()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(249)

本文整理了Java中com.hazelcast.instance.Node.getNodeEngine()方法的一些代码示例,展示了Node.getNodeEngine()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getNodeEngine()方法的具体详情如下:
包路径:com.hazelcast.instance.Node
类名称:Node
方法名:getNodeEngine

Node.getNodeEngine介绍

暂无

代码示例

代码示例来源:origin: hazelcast/hazelcast-jet

  1. JetInstanceImpl(HazelcastInstanceImpl hazelcastInstance, JetConfig config) {
  2. super(hazelcastInstance);
  3. this.nodeEngine = hazelcastInstance.node.getNodeEngine();
  4. this.config = config;
  5. }

代码示例来源:origin: noctarius/snowcast

  1. @Nonnull
  2. private NodeEngine getNodeEngine(@Nonnull HazelcastInstance hazelcastInstance) {
  3. return ExceptionUtils.execute(() -> {
  4. // Ugly hack due to lack in SPI
  5. //ACCESSIBILITY_HACK
  6. Field originalField = HazelcastInstanceProxy.class.getDeclaredField("original");
  7. originalField.setAccessible(true);
  8. HazelcastInstanceImpl impl = (HazelcastInstanceImpl) originalField.get(hazelcastInstance);
  9. return impl.node.getNodeEngine();
  10. }, RETRIEVE_NODE_ENGINE_FAILED);
  11. }
  12. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public Collection<DistributedObject> getDistributedObjects() {
  3. ProxyService proxyService = node.getNodeEngine().getProxyService();
  4. return proxyService.getAllDistributedObjects();
  5. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public <T> T executeTransaction(TransactionOptions options, TransactionalTask<T> task)
  3. throws TransactionException {
  4. TransactionManagerService transactionManagerService = node.getNodeEngine().getTransactionManagerService();
  5. return transactionManagerService.executeTransaction(options, task);
  6. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. private <T> T createMapService() {
  2. ConstructorFunction<NodeEngine, MapService> constructor = getDefaultMapServiceConstructor();
  3. NodeEngineImpl nodeEngine = node.getNodeEngine();
  4. return (T) constructor.createNew(nodeEngine);
  5. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public String addDistributedObjectListener(DistributedObjectListener distributedObjectListener) {
  3. final ProxyService proxyService = node.getNodeEngine().getProxyService();
  4. return proxyService.addProxyListener(distributedObjectListener);
  5. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. @Override
  2. public boolean removeDistributedObjectListener(String registrationId) {
  3. final ProxyService proxyService = node.getNodeEngine().getProxyService();
  4. return proxyService.removeProxyListener(registrationId);
  5. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public boolean removeDistributedObjectListener(String registrationId) {
  3. final ProxyService proxyService = node.getNodeEngine().getProxyService();
  4. return proxyService.removeProxyListener(registrationId);
  5. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public TransactionContext newTransactionContext(TransactionOptions options) {
  3. TransactionManagerService transactionManagerService = node.getNodeEngine().getTransactionManagerService();
  4. return transactionManagerService.newTransactionContext(options);
  5. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. @SuppressWarnings("unchecked")
  3. public <T extends DistributedObject> T getDistributedObject(String serviceName, String name) {
  4. ProxyService proxyService = node.getNodeEngine().getProxyService();
  5. return (T) proxyService.getDistributedObject(serviceName, name);
  6. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. @Override
  2. public Collection<DistributedObject> getDistributedObjects() {
  3. ProxyService proxyService = node.getNodeEngine().getProxyService();
  4. return proxyService.getAllDistributedObjects();
  5. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. @Override
  2. @SuppressWarnings("unchecked")
  3. public <T extends DistributedObject> T getDistributedObject(String serviceName, String name) {
  4. ProxyService proxyService = node.getNodeEngine().getProxyService();
  5. return (T) proxyService.getDistributedObject(serviceName, name);
  6. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. private <T> T createMapService() {
  2. ConstructorFunction<NodeEngine, MapService> constructor = getDefaultMapServiceConstructor();
  3. NodeEngineImpl nodeEngine = node.getNodeEngine();
  4. return (T) constructor.createNew(nodeEngine);
  5. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. PartitionReplicaStateChecker(Node node, InternalPartitionServiceImpl partitionService) {
  2. this.node = node;
  3. this.nodeEngine = node.getNodeEngine();
  4. this.partitionService = partitionService;
  5. this.logger = node.getLogger(getClass());
  6. this.partitionStateManager = partitionService.getPartitionStateManager();
  7. this.migrationManager = partitionService.getMigrationManager();
  8. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. PartitionReplicaStateChecker(Node node, InternalPartitionServiceImpl partitionService) {
  2. this.node = node;
  3. this.nodeEngine = node.getNodeEngine();
  4. this.partitionService = partitionService;
  5. this.logger = node.getLogger(getClass());
  6. this.partitionStateManager = partitionService.getPartitionStateManager();
  7. this.migrationManager = partitionService.getMigrationManager();
  8. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public void onClusterStateChange(ClusterState newState, boolean isTransient) {
  3. ServiceManager serviceManager = node.getNodeEngine().getServiceManager();
  4. List<ClusterStateListener> listeners = serviceManager.getServices(ClusterStateListener.class);
  5. for (ClusterStateListener listener : listeners) {
  6. listener.onClusterStateChange(newState);
  7. }
  8. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. MembershipManager(Node node, ClusterServiceImpl clusterService, Lock clusterServiceLock) {
  2. this.node = node;
  3. this.clusterService = clusterService;
  4. this.clusterServiceLock = clusterServiceLock;
  5. this.nodeEngine = node.getNodeEngine();
  6. this.logger = node.getLogger(getClass());
  7. mastershipClaimTimeoutSeconds = node.getProperties().getInteger(MASTERSHIP_CLAIM_TIMEOUT_SECONDS);
  8. registerThisMember();
  9. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. MembershipManager(Node node, ClusterServiceImpl clusterService, Lock clusterServiceLock) {
  2. this.node = node;
  3. this.clusterService = clusterService;
  4. this.clusterServiceLock = clusterServiceLock;
  5. this.nodeEngine = node.getNodeEngine();
  6. this.logger = node.getLogger(getClass());
  7. mastershipClaimTimeoutSeconds = node.getProperties().getInteger(MASTERSHIP_CLAIM_TIMEOUT_SECONDS);
  8. registerThisMember();
  9. }

代码示例来源:origin: com.hazelcast.simulator/tests-hz36

  1. public static OperationService getOperationService(HazelcastInstance hz) {
  2. Node node = checkNotNull(getNode(hz), "node is null in Hazelcast instance " + hz);
  3. NodeEngineImpl nodeEngine = node.getNodeEngine();
  4. try {
  5. return nodeEngine.getOperationService();
  6. } catch (NoSuchMethodError e) {
  7. // fallback for a binary incompatible change (see commit http://git.io/vtfKU)
  8. return getOperationServiceViaReflection(nodeEngine);
  9. }
  10. }

代码示例来源:origin: com.hazelcast.simulator/tests-hz35

  1. public static OperationService getOperationService(HazelcastInstance hz) {
  2. Node node = checkNotNull(getNode(hz), "node is null in Hazelcast instance " + hz);
  3. NodeEngineImpl nodeEngine = node.getNodeEngine();
  4. try {
  5. return nodeEngine.getOperationService();
  6. } catch (NoSuchMethodError e) {
  7. // fallback for a binary incompatible change (see commit http://git.io/vtfKU)
  8. return getOperationServiceViaReflection(nodeEngine);
  9. }
  10. }

相关文章