Giriş
Şu satırı dahil ederiz
import com.hazelcast.spi.impl.AbstractInvocationFuture;
Member tarafındaki Invocation'ı temsil eder.
Kalıtım şöyle
BaseInvocation
Invocation
MasterInvocation
PartitionInvocation
RaftInvocation
TargetInvocation
WrongTargetException Sınıfı
Açıklaması şöyle
Thrown when an operation is executed on the wrong machine, usually because the partition that operation belongs to has been moved to some other member.
sendResponse metodu
Kod şöyle. Operation sınıfının getResponse() metodu ne döndürürse, bu boolean, void vs. olabilir. complete() metoduna geçilir.
@Override public void sendResponse(Operation op, Object response) { if (!RESPONSE_RECEIVED.compareAndSet(this, FALSE, TRUE)) { throw new ResponseAlreadySentException(...); } if (response instanceof CallTimeoutResponse) { notifyCallTimeout(); } else if (response instanceof ErrorResponse || response instanceof Throwable) { notifyError(response); } else if (response instanceof NormalResponse) { NormalResponse normalResponse = (NormalResponse) response; notifyNormalResponse(normalResponse.getValue(), normalResponse.getBackupAcks()); } else { // there are no backups or the number of expected backups has returned; // so signal the future that the result is ready complete(response); } }
Hiç yorum yok:
Yorum Gönder