Package com.caringo.client

Examples of com.caringo.client.ScspQueryArgs


        ByteArrayInputStream updateStream = new ByteArrayInputStream(testUpdateData.getBytes());
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        try
        {
            System.out.println(">>>>>> Write <<<<<<<<");
            ScspQueryArgs rswArgs = new ScspQueryArgs();
            rswArgs.setValue("replicate","immediate"); //adds the required '?replicate=immediate' query argument
            ScspQueryArgs args = new ScspQueryArgs();
            ScspResponse wcResponse = client.writeMutable(rcn, inputStream, testData.getBytes().length, rswArgs, new ScspHeaders()); //writes a mutable object to the local and remote clusters
            String uuid = wcResponse.getResponseHeaders().getHeaderValues("Content-UUID").get(0);
            System.out.println(wcResponse.toString());

            //Updates the mutable object in the remote cluster
View Full Code Here


      String rcn = "_proxy/drcluster";
        String testData = "Hello world";
        ByteArrayInputStream inputStream = new ByteArrayInputStream(testData.getBytes());
        try
        {
            ScspResponse wcResponse = proxyClient.write("", inputStream, testData.getBytes().length, new ScspQueryArgs(), new ScspHeaders());
            if (wcResponse.getResultCode() == ScspResponse.ScspResultCode.ScspRCFailure) {
              System.out.println("Unabled to write to proxy.");
              res = false;
            }
            else {
              wcResponse = proxyClient.write(rcn, inputStream, testData.getBytes().length, new ScspQueryArgs(), new ScspHeaders());
              if (wcResponse.getResultCode() == ScspResponse.ScspResultCode.ScspRCFailure) {
                  System.out.println("Unabled to write to remote cluster.");
                res = false;
              }
            }
View Full Code Here

        this.startDate = null;
        this.endDate = null;
        this.timeout = null;
        this.enumUuid = null;
        this.enumName = null;
        this.startScspQueryArgs = new ScspQueryArgs();
        this.nextScspQueryArgs = null;
       
        String[] hosts = { publisherHost };
        this.scspClient = new ScspClient(hosts, publisherPort, DEFAULT_MAX_POOL_SIZE, DEFAULT_MAX_RETRIES);
       
View Full Code Here

      if (this.enumUuid != null){
        throw new ObjectEnumeratorException("Enumerator session already in progress");
      }
     
      if (this.startScspQueryArgs == null) {
        this.startScspQueryArgs = new ScspQueryArgs();
      }
     
      if (channelName == null) {
        if (this.channelName == null) {
          throw new ObjectEnumeratorException("Channel name cannot be null");
View Full Code Here

      if (this.enumUuid != null){
        throw new ObjectEnumeratorException("Enumerator session already in progress");
      }
     
      if (this.startScspQueryArgs == null) {
        this.startScspQueryArgs = new ScspQueryArgs();
      }
     
      if (channelName == null) {
        if (this.channelName == null) {
          throw new ObjectEnumeratorException("Channel name cannot be null");
View Full Code Here

      if (this.enumUuid == null) {
        throw new ObjectEnumeratorException("The Object Enumerator must be started before calling next.");
      }
     
      // Reset scspQueryArgs
      nextScspQueryArgs = new ScspQueryArgs();
     
        // Add maxItems to query arguments
      if (maxItems != null && !(this.enumType.equals(EnumeratorType.ENUM_TYPE_METADATA))) {
       
        // Throw exception if maxItem exceeds the hard limit
View Full Code Here

      if (this.enumUuid == null) {
        throw new ObjectEnumeratorException("Cannot end an Object Enumerator session that is not established.");
      }
    
      // Empty query args object for DELETE
      ScspQueryArgs queryArgs = new ScspQueryArgs();
     
      // Empty headers object for DELETE
      ScspHeaders headers = new ScspHeaders();
     
      // Do the DELETE
View Full Code Here

        return "http://" + nodeInetAddr.getHostAddress() + ":" + nodeAddr.getPort() + "/" + bucket + "/" + fileName +
            (_domain==null ? "" : "?domain=" + _domain);
    }

    private ScspQueryArgs domainQueryArg() {
        ScspQueryArgs qa = new ScspQueryArgs();
        if (this._domain != null)
            qa.setValue("domain", this._domain);
        return qa;
    }
View Full Code Here

TOP

Related Classes of com.caringo.client.ScspQueryArgs

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.