Package org.eurekaj.api.datatypes.basic

Examples of org.eurekaj.api.datatypes.basic.BasicGroupedStatistics


  }

  @Override
  public GroupedStatistics getGroupedStatistics(String name, String accountName) {
    BasicGroupedStatistics groupedStatistics = null;

        Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket("Grouped Statistics;" + accountName).execute();
            groupedStatistics = myBucket.fetch(name, BasicGroupedStatistics.class).execute();
View Full Code Here


    this.db = db;
  }

  @Override
  public void persistGroupInstrumentation(GroupedStatistics groupedStatistics) {
    db.put(bytes(groupedStatsBucketKey + groupedStatistics.getAccountName() + ";" + groupedStatistics.getName()), bytes(gson.toJson(new BasicGroupedStatistics(groupedStatistics))));
  }
View Full Code Here

  }

  @Override
  public GroupedStatistics getGroupedStatistics(String name, String accountName) {
    String json = asString(db.get(bytes(groupedStatsBucketKey + accountName + ";" + name)));
    BasicGroupedStatistics groupedStats = gson.fromJson(json, BasicGroupedStatistics.class);
    return groupedStats;
  }
View Full Code Here

    List<GroupedStatistics> groupedStatsList = new ArrayList<>();
   
    DBIterator iterator = db.iterator();
    iterator.seek(bytes(groupedStatsBucketKey + accountName));
    while (iterator.hasNext() && asString(iterator.peekNext().getKey()).startsWith(groupedStatsBucketKey + accountName)) {
      BasicGroupedStatistics groupedStat = gson.fromJson(asString(iterator.next().getValue()), BasicGroupedStatistics.class);
      groupedStatsList.add(groupedStat);
    }
   
    return groupedStatsList;
  }
View Full Code Here

TOP

Related Classes of org.eurekaj.api.datatypes.basic.BasicGroupedStatistics

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.