Giriş
Şu satırı dahil ederiz
import com.hazelcast.client.impl.ClientEngine;
Kalıtım şöyle
ClientEngine
ClientEngineImpl
NoOpClientEngine
Açıklaması şöyle
The ClientMessage class is the main message format used for communication between the client and members. This class encapsulates the message data and provides methods for encoding and decoding the data for transmission over the network.The ClientConnection class is responsible for managing the TCP socket connection between the client and a member. It handles sending and receiving messages, as well as managing the connection lifecycle (e.g. connecting, disconnecting, etc.).The ClientEngineImpl class is responsible for managing the overall client infrastructure, including maintaining a registry of connected clients and managing the communication between clients and members.
ClientEngineImpl Sınıfı
Şu satırı dahil ederiz
import com.hazelcast.client.impl.ClientEngineImpl;
accept metodu
Kodu şöyle
public void accept(ClientMessage clientMessage) { Connection connection = clientMessage.getConnection(); MessageTask messageTask = messageTaskFactory.create(clientMessage, connection); OperationServiceImpl operationService = nodeEngine.getOperationService(); if (isUrgent(messageTask)) { operationService.execute((UrgentMessageTask) messageTask); } else if (messageTask instanceof AbstractPartitionMessageTask) { operationService.execute((AbstractPartitionMessageTask) messageTask); } else if (isQuery(messageTask)) { queryExecutor.execute(messageTask); } else if (messageTask instanceof TransactionalMessageTask) { blockingExecutor.execute(messageTask); } else if (messageTask instanceof BlockingMessageTask) { blockingExecutor.execute(messageTask); } else { executor.execute(messageTask); } }
Hiç yorum yok:
Yorum Gönder