@Override public int size() { return list.size(); }
@Override public int numWorkers() { int num = workers.size(); if(num < 1) throw new IllegalStateException("There appears to have been an issue during initialization. No workers found."); return num; }
@Override public void addWorker(String worker) { heartbeat.put(worker, System.currentTimeMillis()); if(!workers.contains(worker)) { log.info("Adding worker " + worker); workers.add(worker); log.info("Number of workers is now " + workers.size()); } }
@Verify(global = true) public void globalVerify() throws Exception { IList<MapOpperationsCount> results = targetInstance.getList(basename+"report"); MapOpperationsCount total = new MapOpperationsCount(); for(MapOpperationsCount i : results){ total.add(i); } System.out.println(basename+": "+total+" total of "+results.size()); IMap map = targetInstance.getMap(basename); System.out.println(basename+": Map size = "+map.size()); }
@Verify(global = true) public void globalVerify() throws Exception { IList<MapOpperationsCount> results = targetInstance.getList(basename+"report"); MapOpperationsCount total = new MapOpperationsCount(); for(MapOpperationsCount i : results){ total.add(i); } System.out.println(basename+": "+total+" total of "+results.size()); }
@Verify(global = true) public void globalVerify() throws Exception { IList<OppCounterIdxTest> counters = targetInstance.getList(basename+"report"); OppCounterIdxTest total = new OppCounterIdxTest(); for(OppCounterIdxTest c : counters){ total.add(c); } System.out.println(basename+" "+total+" from "+counters.size()); }
@Verify(global = true) public void globalVerify() throws Exception { IList<MapOpperationsCount> results = targetInstance.getList(basename+"report"); MapOpperationsCount total = new MapOpperationsCount(); for(MapOpperationsCount i : results){ total.add(i); } System.out.println(basename+": "+total+" total of "+results.size()); }
@Verify public void globalVerify() { MapOperationCounter total = new MapOperationCounter(); for (MapOperationCounter operationCounter : operationCounterList) { total.add(operationCounter); } logger.info(name + ": " + total + " from " + operationCounterList.size() + " worker threads"); }
@Verify public void globalVerify() { ICacheCreateDestroyCounter total = new ICacheCreateDestroyCounter(); for (ICacheCreateDestroyCounter counter : counters) { total.add(counter); } logger.info(name + ": " + total + " from " + counters.size() + " worker threads"); } }
@Verify public void globalVerify() { ICacheOperationCounter total = new ICacheOperationCounter(); for (ICacheOperationCounter counter : results) { total.add(counter); } logger.info(name + ": " + total + " from " + results.size() + " worker threads"); } }
@Verify(global = true) public void globalVerify() { for (int i = 0; i < listeners.size() - 1; i++) { EntryListenerImpl a = listeners.get(i); EntryListenerImpl b = listeners.get(i + 1); assertEquals(name + ": not same amount of event in all listeners", a, b); } }
@Verify public void globalVerify() { MapOperationCounter totalMapOperationsCount = new MapOperationCounter(); for (MapOperationCounter mapOperationsCount : results) { totalMapOperationsCount.add(mapOperationsCount); } logger.info(name + ": " + totalMapOperationsCount + " total of " + results.size()); }
@Verify(global = true) public void globalVerify() { ICacheReadWriteCounter total = new ICacheReadWriteCounter(); for (ICacheReadWriteCounter counter : counters) { total.add(counter); } logger.info(name + ": " + total + " from " + counters.size() + " worker threads"); } }
@Verify(global = true) public void globalVerify() { ICacheListenerOperationCounter total = new ICacheListenerOperationCounter(); for (ICacheListenerOperationCounter i : results) { total.add(i); } logger.info(name + ": " + total + " from " + results.size() + " worker threads"); } }
@Verify(global = true) public void globalVerify() { MapReduceOperationCounter total = new MapReduceOperationCounter(); for (MapReduceOperationCounter operationCounter : operationCounterList) { total.add(operationCounter); } logger.info(name + ": " + total + " from " + operationCounterList.size() + " worker threads"); }
@Verify(global = true) public void globalVerify() { MapOperationCounter totalMapOperationsCount = new MapOperationCounter(); for (MapOperationCounter mapOperationsCount : results) { totalMapOperationsCount.add(mapOperationsCount); } logger.info(name + ": " + totalMapOperationsCount + " total of " + results.size()); }
@Verify public void globalVerify() { MapOperationCounter total = new MapOperationCounter(); for (MapOperationCounter operationCounter : operationCounterList) { total.add(operationCounter); } logger.info(name + ": " + total + " from " + operationCounterList.size() + " worker threads"); }
@Verify public void globalVerify() { Counter total = new Counter(); for (Counter counter : counterList) { total.add(counter); } logger.info(name + ": " + total + " from " + counterList.size() + " worker threads"); assertEquals(name + ": We expect 0 CacheException from multi node create cache calls", 0, total.createException); } }
@Verify(global = true) public void golbalVerify() throws Exception { IList<EntryListenerImpl> resultListners = targetInstance.getList(basename + "listeners"); for(int i=0; i<resultListners.size()-1; i++){ EntryListenerImpl a = resultListners.get(i); EntryListenerImpl b = resultListners.get(i+1); assertEquals("not same amount of event in all listeners", a, b); } }
@Verify public void globalVerify() { IQueue queue = targetInstance.getQueue(name + 'q'); IList<TxnCounter> results = targetInstance.getList(name + "results"); TxnCounter total = new TxnCounter(); for (TxnCounter counter : results) { total.add(counter); } logger.info(name + ": " + total + " from " + results.size() + " worker Threads Queue size=" + queue.size()); assertFalse(name + ": firstLock.isLocked()", firstLock.isLocked()); assertFalse(name + ": secondLock.isLocked()", secondLock.isLocked()); // TODO: check if this assert can be re-enabled: assertEquals(total.committed - total.rolled, queue.size()) } }