@Override public InternalSerializationService getSerializationService() { return node.getSerializationService(); }
@Override public InternalSerializationService getSerializationService() { return node.getSerializationService(); }
@Override public InternalSerializationService getSerializationService() { return node.getSerializationService(); }
@Override public InternalSerializationService getSerializationService() { return node.getSerializationService(); }
@Override public byte[] toByteArray(Object value) { Data data = node.getSerializationService().toData(value); return data.toByteArray(); }
/** * This method has a direct dependency on how objects are serialized. * If the stream format is changed, this extraction method must be changed as well. * <p> * It makes an assumption that the callId is the first long field in the serialized operation. */ private long extractOperationCallId(Data data) throws IOException { ObjectDataInput input = ((SerializationServiceV1) node.getSerializationService()) .initDataSerializableInputAndSkipTheHeader(data); return input.readLong(); }
@Override public void setNode(Node node) { ManagedContext managedContext = node.getSerializationService().getManagedContext(); managedContext.initialize(task); }
@Override public byte[] toByteArray(Object value) { Data data = node.getSerializationService().toData(value); return data.toByteArray(); }
/** * This method has a direct dependency on how objects are serialized. * If the stream format is changed, this extraction method must be changed as well. * <p> * It makes an assumption that the callId is the first long field in the serialized operation. */ private long extractOperationCallId(Data data) throws IOException { ObjectDataInput input = ((SerializationServiceV1) node.getSerializationService()) .initDataSerializableInputAndSkipTheHeader(data); return input.readLong(); }
@Override public void setNode(Node node) { ManagedContext managedContext = node.getSerializationService().getManagedContext(); managedContext.initialize(task); }
protected AbstractMessageTask(ClientMessage clientMessage, Node node, Connection connection) { this.clientMessage = clientMessage; this.logger = node.getLogger(getClass()); this.node = node; this.nodeEngine = node.nodeEngine; this.serializationService = node.getSerializationService(); this.connection = connection; this.clientEngine = node.clientEngine; this.endpointManager = clientEngine.getEndpointManager(); this.endpoint = initEndpoint(); }
protected AbstractMessageTask(ClientMessage clientMessage, Node node, Connection connection) { this.clientMessage = clientMessage; this.logger = node.getLogger(getClass()); this.node = node; this.nodeEngine = node.nodeEngine; this.serializationService = node.getSerializationService(); this.connection = connection; this.clientEngine = node.clientEngine; this.endpointManager = clientEngine.getEndpointManager(); this.endpoint = initEndpoint(); }
static MemoryStats getMemoryStats(HazelcastInstance hz) { // use this method or another way for getting "Node" from a "HazelcastInstance" Node node = getNode(hz); if (node != null) { EnterpriseSerializationService serializationService = (EnterpriseSerializationService) node.getSerializationService(); HazelcastMemoryManager memoryManager = serializationService.getMemoryManager(); return memoryManager.getMemoryStats(); } else { return new DefaultMemoryStats(); } } }
@Override public Object initialize(Object obj) { if (obj instanceof HazelcastInstanceAware) { ((HazelcastInstanceAware) obj).setHazelcastInstance(instance); } if (obj instanceof NodeAware) { ((NodeAware) obj).setNode(instance.node); } if (obj instanceof SerializationServiceAware) { ((SerializationServiceAware) obj).setSerializationService(instance.node.getSerializationService()); } if (hasExternalContext) { return externalContext.initialize(obj); } return obj; } }
@Override public Object initialize(Object obj) { if (obj instanceof HazelcastInstanceAware) { ((HazelcastInstanceAware) obj).setHazelcastInstance(instance); } if (obj instanceof NodeAware) { ((NodeAware) obj).setNode(instance.node); } if (obj instanceof SerializationServiceAware) { ((SerializationServiceAware) obj).setSerializationService(instance.node.getSerializationService()); } if (hasExternalContext) { return externalContext.initialize(obj); } return obj; } }
private MulticastService(Node node, MulticastSocket multicastSocket) throws Exception { this.logger = node.getLogger(MulticastService.class.getName()); this.node = node; this.multicastSocket = multicastSocket; NodeIOService nodeIOService = new NodeIOService(node, node.nodeEngine); this.inputProcessor = node.getNodeExtension().createMulticastInputProcessor(nodeIOService); this.outputProcessor = node.getNodeExtension().createMulticastOutputProcessor(nodeIOService); this.sendOutput = node.getSerializationService().createObjectDataOutput(SEND_OUTPUT_SIZE); Config config = node.getConfig(); MulticastConfig multicastConfig = config.getNetworkConfig().getJoin().getMulticastConfig(); this.datagramPacketSend = new DatagramPacket(new byte[0], 0, InetAddress.getByName(multicastConfig.getMulticastGroup()), multicastConfig.getMulticastPort()); this.datagramPacketReceive = new DatagramPacket(new byte[DATAGRAM_BUFFER_SIZE], DATAGRAM_BUFFER_SIZE); Set<String> trustedInterfaces = multicastConfig.getTrustedInterfaces(); ILogger logger = node.getLogger(JoinMessageTrustChecker.class); joinMessageTrustChecker = new JoinMessageTrustChecker(trustedInterfaces, logger); }
private MulticastService(Node node, MulticastSocket multicastSocket) throws Exception { this.logger = node.getLogger(MulticastService.class.getName()); this.node = node; this.multicastSocket = multicastSocket; NodeIOService nodeIOService = new NodeIOService(node, node.nodeEngine); this.inputProcessor = node.getNodeExtension().createMulticastInputProcessor(nodeIOService); this.outputProcessor = node.getNodeExtension().createMulticastOutputProcessor(nodeIOService); this.sendOutput = node.getSerializationService().createObjectDataOutput(SEND_OUTPUT_SIZE); Config config = node.getConfig(); MulticastConfig multicastConfig = config.getNetworkConfig().getJoin().getMulticastConfig(); this.datagramPacketSend = new DatagramPacket(new byte[0], 0, InetAddress.getByName(multicastConfig.getMulticastGroup()), multicastConfig.getMulticastPort()); this.datagramPacketReceive = new DatagramPacket(new byte[DATAGRAM_BUFFER_SIZE], DATAGRAM_BUFFER_SIZE); Set<String> trustedInterfaces = multicastConfig.getTrustedInterfaces(); ILogger logger = node.getLogger(JoinMessageTrustChecker.class); joinMessageTrustChecker = new JoinMessageTrustChecker(trustedInterfaces, logger); }
public ClientEngineImpl(Node node) { this.logger = node.getLogger(ClientEngine.class); this.node = node; this.serializationService = node.getSerializationService(); this.nodeEngine = node.nodeEngine; this.endpointManager = new ClientEndpointManagerImpl(nodeEngine); this.executor = newClientExecutor(); this.queryExecutor = newClientQueryExecutor(); this.clientManagementExecutor = newClientsManagementExecutor(); this.messageTaskFactory = new CompositeMessageTaskFactory(nodeEngine); this.clientExceptions = initClientExceptionFactory(); this.endpointRemoveDelaySeconds = node.getProperties().getInteger(GroupProperty.CLIENT_ENDPOINT_REMOVE_DELAY_SECONDS); this.partitionListenerService = new ClientPartitionListenerService(nodeEngine); }
public ClientEngineImpl(Node node) { this.logger = node.getLogger(ClientEngine.class); this.node = node; this.serializationService = node.getSerializationService(); this.nodeEngine = node.nodeEngine; this.endpointManager = new ClientEndpointManagerImpl(nodeEngine); this.executor = newClientExecutor(); this.queryExecutor = newClientQueryExecutor(); this.blockingExecutor = newBlockingExecutor(); this.clientManagementExecutor = newClientsManagementExecutor(); this.messageTaskFactory = new CompositeMessageTaskFactory(nodeEngine); this.clientExceptions = initClientExceptionFactory(); this.endpointRemoveDelaySeconds = node.getProperties().getInteger(GroupProperty.CLIENT_ENDPOINT_REMOVE_DELAY_SECONDS); this.partitionListenerService = new ClientPartitionListenerService(nodeEngine); }
this.node = node; try { this.serializationService = node.getSerializationService(); this.loggingService = node.loggingService; this.logger = node.getLogger(NodeEngine.class.getName());