use of org.apache.geode.cache.GemFireCache in project geode by apache.
the class RollingUpgrade2DUnitTest method rebalance.
public static void rebalance(Object cache) throws Exception {
RebalanceOperation op = ((GemFireCache) cache).getResourceManager().createRebalanceFactory().start();
// Wait until the rebalance is completex
RebalanceResults results = op.getResults();
Method getTotalTimeMethod = results.getClass().getMethod("getTotalTime");
getTotalTimeMethod.setAccessible(true);
System.out.println("Took " + results.getTotalTime() + " milliseconds\n");
System.out.println("Transfered " + results.getTotalBucketTransferBytes() + "bytes\n");
}
Aggregations