public class ClientCardinalityEstimatorProxy extends ClientProxy implements CardinalityEstimator
CardinalityEstimator.name| Constructor and Description | 
|---|
| ClientCardinalityEstimatorProxy(String serviceName,
                               String objectId) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(Object obj)Add a new object in the estimation set. | 
| InternalCompletableFuture<Void> | addAsync(Object obj)Add a new object in the estimation set. | 
| long | estimate()Estimates the cardinality of the aggregation so far. | 
| InternalCompletableFuture<Long> | estimateAsync()Estimates the cardinality of the aggregation so far. | 
| protected ClientMessage | invokeOnPartition(ClientMessage req) | 
| protected <T> ClientDelegatingFuture<T> | invokeOnPartitionAsync(ClientMessage clientMessage,
                      ClientMessageDecoder clientMessageDecoder) | 
| protected <T> T | invokeOnPartitionInterruptibly(ClientMessage clientMessage) | 
| protected void | onInitialize()Called when proxy is created. | 
| String | toString() | 
deregisterListener, destroy, equals, getClient, getContext, getDistributedObjectName, getId, getName, getPartitionKey, getSerializationService, getServiceName, hashCode, invoke, invoke, invokeOnPartition, invokeOnPartitionInterruptibly, onDestroy, onShutdown, postDestroy, preDestroy, registerListener, setContext, toData, toObjectclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getName, getPartitionKey, getServiceNamepublic void add(Object obj)
CardinalityEstimatoradd in interface CardinalityEstimatorobj - object to add in the estimation set.public long estimate()
CardinalityEstimatorestimate in interface CardinalityEstimatorpublic InternalCompletableFuture<Void> addAsync(Object obj)
CardinalityEstimatorICompletableFuture.
 The operations result can be obtained in a blocking way, or a
 callback can be provided for execution upon completion, as demonstrated in the following examples:
 
     ICompletableFuture<Void> future = estimator.addAsync();
     // do something else, then read the result
     Boolean result = future.get(); // this method will block until the result is available
 
 
 
     ICompletableFuture<Void> future = estimator.addAsync();
     future.andThen(new ExecutionCallback<Void>() {
          void onResponse(Void response) {
              // do something
          }
          void onFailure(Throwable t) {
              // handle failure
          }
     });
 
 addAsync in interface CardinalityEstimatorobj - object to add in the estimation set.ICompletableFuture API consumers can use to track execution of this request.public InternalCompletableFuture<Long> estimateAsync()
CardinalityEstimatorICompletableFuture.
 The operations result can be obtained in a blocking way, or a
 callback can be provided for execution upon completion, as demonstrated in the following examples:
 
     ICompletableFuture<Long> future = estimator.estimateAsync();
     // do something else, then read the result
     Long result = future.get(); // this method will block until the result is available
 
 
 
     ICompletableFuture<Long> future = estimator.estimateAsync();
     future.andThen(new ExecutionCallback<Long>() {
          void onResponse(Long response) {
              // do something with the result
          }
          void onFailure(Throwable t) {
              // handle failure
          }
     });
 
 estimateAsync in interface CardinalityEstimatorICompletableFuture bearing the response, the estimate.protected void onInitialize()
ClientProxyonInitialize in class ClientProxyprotected ClientMessage invokeOnPartition(ClientMessage req)
protected <T> T invokeOnPartitionInterruptibly(ClientMessage clientMessage) throws InterruptedException
InterruptedExceptionprotected <T> ClientDelegatingFuture<T> invokeOnPartitionAsync(ClientMessage clientMessage, ClientMessageDecoder clientMessageDecoder)
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.