9 Kasım 2022 Çarşamba

HazelcastClientAPI ClientResponseHandlerSupplier Sınıfı

Giriş
Şu satırı dahil ederiz
import com.hazelcast.client.impl.spi.impl.ClientResponseHandlerSupplier;
handleResponse metodu
Eğer çağrı sonucunda exception varsa call stack şöyle
handleResponse:164, ClientResponseHandlerSupplier (com.hazelcast.client.impl.spi.impl)
process:141, ClientResponseHandlerSupplier (com.hazelcast.client.impl.spi.impl)
access$300:60, ClientResponseHandlerSupplier (com.hazelcast.client.impl.spi.impl)
accept:251, ClientResponseHandlerSupplier$DynamicResponseHandler ...
accept:243, ClientResponseHandlerSupplier$DynamicResponseHandler ...
handleClientMessage:247, TcpClientConnection (com.hazelcast.client.impl.connection.tcp)
accept:-1, ClientPlainChannelInitializer ...
handleMessage:135, ClientMessageDecoder (com.hazelcast.client.impl.protocol.util)
onRead:89, ClientMessageDecoder (com.hazelcast.client.impl.protocol.util)
process:137, NioInboundPipeline (com.hazelcast.internal.networking.nio)
processSelectionKey:383, NioThread (com.hazelcast.internal.networking.nio)
processSelectionKeys:368, NioThread (com.hazelcast.internal.networking.nio)
selectLoop:294, NioThread (com.hazelcast.internal.networking.nio)
executeRun:249, NioThread (com.hazelcast.internal.networking.nio)
run:102, HazelcastManagedThread (com.hazelcast.internal.util.executor)
Metodun içi şöyle. Cevabı ClientInvocation tipindeki nesneye yönlendirir.
private void handleResponse(ClientMessage message) {
  ...

  long correlationId = message.getCorrelationId();

  ClientInvocation invocation = invocationService.getInvocation(correlationId);
  if (invocation == null) {
    logger.warning("No call for callId: " + correlationId + ", response: " + message);
    return;
  }

  if (EXCEPTION_MESSAGE_TYPE == message.getMessageType()) {
    invocation.notifyException(correlationId,
      client.getClientExceptionFactory().createException(message));
  } else {
    invocation.notify(message);
  }
}

Hiç yorum yok:

Yorum Gönder

THIRD-PARTY.txt Dosyası

Kullanılan harici kütüphanelerin sürümleri bu dosyada Dosyanın yolu şöyle hazelcast/licenses/THIRD-PARTY.txt