// Path: src/main/java/org/rakam/cache/hazelcast/hyperloglog/operations/AddAllOperation.java
// public class AddAllOperation extends HyperLogLogBackupAwareOperation {
// 
//     private Collection<String> items;
// 
//     public AddAllOperation() {
//     }
// 
//     public AddAllOperation(String name, Collection<String> item) {
//         super(name);
//         this.items = item;
//     }
// 
//     @Override
//     public void run() throws Exception {
//         HLLWrapper hll = getHLL();
//         hll.addAll(items);
//     }
// 
//     @Override
//     public int getId() {
//         return HyperLogLogSerializerFactory.ADD_ALL;
//     }
// 
//     @Override
//     protected void writeInternal(ObjectDataOutput out) throws IOException {
//         super.writeInternal(out);
//         out.writeInt(items.size());
//         for (String item : items)
//             out.writeUTF(item);
//     }
// 
//     @Override
//     protected void readInternal(ObjectDataInput in) throws IOException {
//         super.readInternal(in);
//         int size = in.readInt();
//         items = new ArrayList(size);
//         for (int i = 0; i < size; i++)
//             items.add(in.readUTF());
//     }
// 
//     @Override
//     public Operation getBackupOperation() {
//         return new AddAllBackupOperation(name, items);
//     }
// }


import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;
import com.hazelcast.nio.serialization.PortableReader;
import com.hazelcast.nio.serialization.PortableWriter;
import com.hazelcast.spi.Operation;
import org.rakam.cache.hazelcast.hyperloglog.operations.AddAllOperation;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
/**
 * Created by buremba <Burak Emre Kabakcı> on 10/07/14.
 */
package org.rakam.cache.hazelcast.hyperloglog.client;




public class AddAllRequest extends WriteRequest {

    private Collection<String> items;

    public AddAllRequest() {
    }

    protected AddAllRequest(String name, Collection<String> items) {
        this.name = name;
        this.items = items;
    }

    @Override
    protected Operation prepareOperation() {
// Path: src/main/java/org/rakam/cache/hazelcast/hyperloglog/operations/AddAllOperation.java
// public class AddAllOperation extends HyperLogLogBackupAwareOperation {
// 
//     private Collection<String> items;
// 
//     public AddAllOperation() {
//     }
// 
//     public AddAllOperation(String name, Collection<String> item) {
//         super(name);
//         this.items = item;
//     }
// 
//     @Override
//     public void run() throws Exception {
//         HLLWrapper hll = getHLL();
//         hll.addAll(items);
//     }
// 
//     @Override
//     public int getId() {
//         return HyperLogLogSerializerFactory.ADD_ALL;
//     }
// 
//     @Override
//     protected void writeInternal(ObjectDataOutput out) throws IOException {
//         super.writeInternal(out);
//         out.writeInt(items.size());
//         for (String item : items)
//             out.writeUTF(item);
//     }
// 
//     @Override
//     protected void readInternal(ObjectDataInput in) throws IOException {
//         super.readInternal(in);
//         int size = in.readInt();
//         items = new ArrayList(size);
//         for (int i = 0; i < size; i++)
//             items.add(in.readUTF());
//     }
// 
//     @Override
//     public Operation getBackupOperation() {
//         return new AddAllBackupOperation(name, items);
//     }
// }


// Path: src/main/java/org/rakam/cache/hazelcast/hyperloglog/client/AddAllRequest.java
import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;
import com.hazelcast.nio.serialization.PortableReader;
import com.hazelcast.nio.serialization.PortableWriter;
import com.hazelcast.spi.Operation;
import org.rakam.cache.hazelcast.hyperloglog.operations.AddAllOperation;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;

/**
 * Created by buremba <Burak Emre Kabakcı> on 10/07/14.
 */
package org.rakam.cache.hazelcast.hyperloglog.client;




public class AddAllRequest extends WriteRequest {

    private Collection<String> items;

    public AddAllRequest() {
    }

    protected AddAllRequest(String name, Collection<String> items) {
        this.name = name;
        this.items = items;
    }

    @Override
    protected Operation prepareOperation() {
        return new AddAllOperation(name, items);