Package com.basho.riak.client.bucket

Examples of com.basho.riak.client.bucket.Bucket.fetch()


        long hoursSince1970 = timeperiod / 240;

        Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket(accountName + ";" + hoursSince1970).execute();
            BasicMetricHour storedMetricHour = myBucket.fetch("" + guiPath, BasicMetricHour.class).execute();
            if (storedMetricHour == null) {
                storedMetricHour = new BasicMetricHour(guiPath, accountName, hoursSince1970, valueType.toString(), unitType.toString());
            }

            storedMetricHour.addStatistic(new BasicLiveStatistics(guiPath, accountName, timeperiod, valueDouble, valueType.value(), unitType.value(), count));
View Full Code Here


        BasicMetricHour metricHour = null;

        Bucket mhBucket = null;
        try {
            mhBucket = riakClient.fetchBucket(accountName + ";" + hoursSince1970).execute();
            metricHour = mhBucket.fetch("" + guiPath, BasicMetricHour.class).execute();
            logger.info("finding: " + accountName + ";" + hoursSince1970 + "/" + guiPath);
            if (metricHour != null) {
                metricHourCache.put(
                        metricHour.getAccountName() + ";" + metricHour.getGuiPath() + ";" + metricHour.getHoursSince1970(),
                        metricHour
View Full Code Here

    BasicGroupedStatistics groupedStatistics = null;

        Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket("Grouped Statistics;" + accountName).execute();
            groupedStatistics = myBucket.fetch(name, BasicGroupedStatistics.class).execute();
        } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        }

        return groupedStatistics;
View Full Code Here

        Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket("Grouped Statistics;" + accountName).execute();

            for (String key : myBucket.fetchIndex(BucketIndex.index).withValue("$key").execute()) {
                gsList.add(myBucket.fetch(key, BasicGroupedStatistics.class).execute());
            }
        } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        } catch (RiakException e) {
            e.printStackTrace();
View Full Code Here

    Bucket bucket = null;
    try {
      bucket = riakClient.fetchBucket(bucketName).execute();
     
      for (String key : bucket.fetchIndex(BucketIndex.index).withValue("$key").execute()) {
        resultList.add(bucket.fetch(key, clazz).execute());
      }
    } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        } catch (RiakException e) {
            e.printStackTrace();
View Full Code Here

    E returnObject = null;
   
    Bucket bucket = null;
    try {
      bucket = riakClient.fetchBucket(bucketName).execute();
      returnObject = bucket.fetch(key, clazz).execute();
    } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        }  
   
    return returnObject;
View Full Code Here

        BasicAlert alert = null;

        Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket("Alert;" + accountName).execute();
            alert = myBucket.fetch(alertName, BasicAlert.class).execute();
        } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        }

        return alert;
View Full Code Here

        Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket("Alert;" + accountName).execute();

            for (String key : myBucket.fetchIndex(BucketIndex.index).withValue("$key").execute()) {
                alertList.add(myBucket.fetch(key, BasicAlert.class).execute());
            }
        } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        } catch (RiakException e) {
            e.printStackTrace();
View Full Code Here

        Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket("Account").execute();

            for (String key : myBucket.fetchIndex(BucketIndex.index).withValue("$key").execute()) {
              accountList.add(myBucket.fetch(key, BasicAccount.class).execute());
            }
        } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        } catch (RiakException e) {
            e.printStackTrace();
View Full Code Here

    Account account = null;
   
    Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket("Account").execute();
          account = myBucket.fetch(this.encodeUri(id), BasicAccount.class).execute();
        } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        } catch (RiakException e) {
            e.printStackTrace();
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.