Search in sources :

Example 1 with CardinalityEstimatorContainer

use of com.hazelcast.cardinality.impl.CardinalityEstimatorContainer in project hazelcast by hazelcast.

the class ReplicationOperation method readInternal.

@Override
protected void readInternal(ObjectDataInput in) throws IOException {
    int mapSize = in.readInt();
    migrationData = new HashMap<String, CardinalityEstimatorContainer>(mapSize);
    for (int i = 0; i < mapSize; i++) {
        String name = in.readUTF();
        CardinalityEstimatorContainer newCont = in.readObject();
        migrationData.put(name, newCont);
    }
}
Also used : CardinalityEstimatorContainer(com.hazelcast.cardinality.impl.CardinalityEstimatorContainer)

Example 2 with CardinalityEstimatorContainer

use of com.hazelcast.cardinality.impl.CardinalityEstimatorContainer in project hazelcast by hazelcast.

the class AggregateBackupOperation method run.

@Override
public void run() throws Exception {
    CardinalityEstimatorContainer container = getCardinalityEstimatorContainer();
    container.add(hash);
}
Also used : CardinalityEstimatorContainer(com.hazelcast.cardinality.impl.CardinalityEstimatorContainer)

Example 3 with CardinalityEstimatorContainer

use of com.hazelcast.cardinality.impl.CardinalityEstimatorContainer in project hazelcast by hazelcast.

the class ReplicationOperation method run.

@Override
public void run() throws Exception {
    CardinalityEstimatorService service = getService();
    for (Map.Entry<String, CardinalityEstimatorContainer> entry : migrationData.entrySet()) {
        String name = entry.getKey();
        service.addCardinalityEstimator(name, entry.getValue());
    }
}
Also used : Map(java.util.Map) HashMap(java.util.HashMap) CardinalityEstimatorService(com.hazelcast.cardinality.impl.CardinalityEstimatorService) CardinalityEstimatorContainer(com.hazelcast.cardinality.impl.CardinalityEstimatorContainer)

Aggregations

CardinalityEstimatorContainer (com.hazelcast.cardinality.impl.CardinalityEstimatorContainer)3 CardinalityEstimatorService (com.hazelcast.cardinality.impl.CardinalityEstimatorService)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1