Skip to content

Instantly share code, notes, and snippets.

@Hkazanci93
Created March 29, 2022 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hkazanci93/d098caf836f00690ec646ba47850f754 to your computer and use it in GitHub Desktop.
Save Hkazanci93/d098caf836f00690ec646ba47850f754 to your computer and use it in GitHub Desktop.
String balance_ts_key = BALANCE_TS + principal.getName();
Map<String, String> tsValues = tsc.range(balance_ts_key, System.currentTimeMillis() - (1000 * 60 * 60 * 24 * 7),
System.currentTimeMillis());
Balance[] balanceTs = new Balance[tsValues.size()];
int i = 0;
for (Entry<String, String> entry : tsValues.entrySet()) {
Object keyString = entry.getKey();
Object valueString = entry.getValue();
balanceTs[i] = new Balance(keyString, valueString);
i++;
}
return balanceTs;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment