// Path: src/main/java/org/rakam/cache/hazelcast/treemap/operations/GetOperation.java
// public class GetOperation extends TreeMapBaseOperation {
//     private Integer numberOfElements = null;
//     private Map<String, Long> returnValue;
// 
//     public GetOperation(String name) {
//         super(name);
//     }
// 
//     public GetOperation() {
// 
//     }
// 
//     public GetOperation(String name, Integer numberOfElements) {
//         super(name);
//         this.numberOfElements = numberOfElements;
//     }
// 
//     @Override
//     public int getId() {
//         return TreeMapSerializerFactory.GET;
//     }
// 
//     @Override
//     public void run() throws Exception {
//         TreeMapService service = getService();
//         if(numberOfElements==null)
//             this.returnValue = service.getHLL(name).getAll();
//         else
//             this.returnValue = service.getHLL(name).getTopItems(numberOfElements);
//     }
// 
//     @Override
//     public Object getResponse() {
//         return returnValue;
//     }
// }


import com.hazelcast.nio.serialization.PortableReader;
import com.hazelcast.nio.serialization.PortableWriter;
import com.hazelcast.spi.Operation;
import org.rakam.cache.hazelcast.treemap.operations.GetOperation;
import java.io.IOException;
package org.rakam.cache.hazelcast.treemap.client;



/**
 * Created by buremba <Burak Emre Kabakcı> on 19/07/14 20:24.
 */
public class GetRequest extends ReadRequest {
    private Integer limit;

    public GetRequest(String name, Integer limit) {
        super(name);
        this.limit = limit==null ? -1 : limit;
    }

    public GetRequest() {

    }

    @Override
    protected Operation prepareOperation() {
// Path: src/main/java/org/rakam/cache/hazelcast/treemap/operations/GetOperation.java
// public class GetOperation extends TreeMapBaseOperation {
//     private Integer numberOfElements = null;
//     private Map<String, Long> returnValue;
// 
//     public GetOperation(String name) {
//         super(name);
//     }
// 
//     public GetOperation() {
// 
//     }
// 
//     public GetOperation(String name, Integer numberOfElements) {
//         super(name);
//         this.numberOfElements = numberOfElements;
//     }
// 
//     @Override
//     public int getId() {
//         return TreeMapSerializerFactory.GET;
//     }
// 
//     @Override
//     public void run() throws Exception {
//         TreeMapService service = getService();
//         if(numberOfElements==null)
//             this.returnValue = service.getHLL(name).getAll();
//         else
//             this.returnValue = service.getHLL(name).getTopItems(numberOfElements);
//     }
// 
//     @Override
//     public Object getResponse() {
//         return returnValue;
//     }
// }


// Path: src/main/java/org/rakam/cache/hazelcast/treemap/client/GetRequest.java
import com.hazelcast.nio.serialization.PortableReader;
import com.hazelcast.nio.serialization.PortableWriter;
import com.hazelcast.spi.Operation;
import org.rakam.cache.hazelcast.treemap.operations.GetOperation;
import java.io.IOException;

package org.rakam.cache.hazelcast.treemap.client;



/**
 * Created by buremba <Burak Emre Kabakcı> on 19/07/14 20:24.
 */
public class GetRequest extends ReadRequest {
    private Integer limit;

    public GetRequest(String name, Integer limit) {
        super(name);
        this.limit = limit==null ? -1 : limit;
    }

    public GetRequest() {

    }

    @Override
    protected Operation prepareOperation() {
        return new GetOperation(name, limit==-1 ? null : limit);