Package net.citrusleaf.CitrusleafClient

Examples of net.citrusleaf.CitrusleafClient.ClResult


  // doesn't! but the connection has the input stream, so there.
 
  public ClResult retrieve(CLBuffer clBuf) throws IOException, SerializeException
  {
    InputStream is;
    ClResult rv = null;
    try {
      if (socket.getSoTimeout() < 1) {
        CitrusleafClient.info("retrieve: bad SO timeout "+socket.getSoTimeout() );
      } else if (socket.getSoTimeout() > 10000) {
        CitrusleafClient.info("retrieve: bad SO timeout "+socket.getSoTimeout() );
View Full Code Here


          System.out.println("Failure write a person with " + rc + "  in "+ (stop-start) + " milliseconds");
       
        //List reads
        System.out.println("Read a person");
        start = System.currentTimeMillis();
        ClResult cr = cc.getAll("test", "people", key, null);
        stop = System.currentTimeMillis();
       
        System.out.println("Completed read person of " + cr.results.keySet().size() + " bins holding integers in " + (stop-start) + " milliseconds");

        cc.delete("test", "people", key, null, null);
View Full Code Here

        cc.close();
      }
    }
  }
  public static void readingSingleValue(CitrusleafClient cc, String namespace){
    ClResult cr = cc.get(namespace, "myset", "mykey", "name", null);
    if (cr.result != null) {
      System.out.println("read single value:" + cr.result);
    }
  }
View Full Code Here

    if (cr.result != null) {
      System.out.println("read single value:" + cr.result);
    }
  }
  public void readingMultipleValues(CitrusleafClient cc, String namespace){
    ClResult cr = cc.getAll(namespace, "myset", "mykey", null);
    if (cr.results != null) {
      for (String binName : cr.results.keySet()) {
        System.out.println("got " + binName + ":"+cr.results.get(binName));
      }
    }
View Full Code Here

  }

  @Override
  public Customer getCustomer(String pCustomerName) throws NoSuchCustomerException {
    ClResult result = DBClient.getInstance().getAll(DBClient.NAME_SPACE, "Customer", pCustomerName, null);
    if (result.resultCode != ClResultCode.OK){
      throw new NoSuchCustomerException("cannot find customer " + pCustomerName);
    }
   
    Customer customer = new Customer();
View Full Code Here

  // doesn't! but the connection has the input stream, so there.
 
  public ClResult retrieve(CLBuffer clBuf) throws IOException, SerializeException
  {
    InputStream is;
    ClResult rv = null;
    try {
      if (socket.getSoTimeout() < 1) {
        CitrusleafClient.ClLog(CitrusleafClient.ClLogLevel.INFO,"retrieve: bad SO timeout "+socket.getSoTimeout() );
      } else if (socket.getSoTimeout() > 10000) {
        CitrusleafClient.ClLog(CitrusleafClient.ClLogLevel.INFO,"retrieve: bad SO timeout "+socket.getSoTimeout() );
View Full Code Here

    //bins.put("nextID", 1);
    //ClResult result = DBClient.getInstance().addAndGet(DBClient.NAME_SPACE, "IDtable", "Order", bins, null, null);
    ClResultCode resultCode = DBClient.getInstance().add(DBClient.NAME_SPACE, "IDtable", "Order", "nextID", 1, null, null);
    if (resultCode != ClResultCode.OK)
      return -2;
    ClResult result = DBClient.getInstance().get(DBClient.NAME_SPACE, "IDtable", "Order", "nextID", null);
    if (result.resultCode == ClResultCode.OK) {
      int nextID = (Integer) result.result;
      return nextID;
    } else {
      return -1;
View Full Code Here

  // doesn't! but the connection has the input stream, so there.
 
  public ClResult retrieve(CLBuffer clBuf) throws IOException, SerializeException
  {
    InputStream is;
    ClResult rv = null;
    try {
      if (socket.getSoTimeout() < 1) {
        CitrusleafClient.info("retrieve: bad SO timeout "+socket.getSoTimeout() );
      } else if (socket.getSoTimeout() > 10000) {
        CitrusleafClient.info("retrieve: bad SO timeout "+socket.getSoTimeout() );
View Full Code Here

TOP

Related Classes of net.citrusleaf.CitrusleafClient.ClResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.