@Override public void run() { boolean keepGoing = true; long total = 0; long interval = 100; while ( keepGoing ) { keepGoing = !cacheEventQueue.isEmpty(); try { Thread.sleep( interval ); total += interval; // log.info( "total = " + total ); } catch ( InterruptedException e ) { break; } } log.info( "No longer waiting for event queue to finish: " + cacheEventQueue.getStatistics() ); } };
@Override public void run() { boolean keepGoing = true; // long total = 0; long interval = 100; while ( keepGoing ) { keepGoing = !cacheEventQueue.isEmpty(); try { Thread.sleep( interval ); // total += interval; // log.info( "total = " + total ); } catch ( InterruptedException e ) { break; } } log.info( "No longer waiting for event queue to finish: " + cacheEventQueue.getStatistics() ); } };
/** * Returns semi-structured data. * * @see org.apache.commons.jcs.auxiliary.AuxiliaryCache#getStatistics() */ @Override public IStats getStatistics() { IStats stats = new Stats(); stats.setTypeName( "Abstract Disk Cache" ); ArrayList<IStatElement<?>> elems = new ArrayList<IStatElement<?>>(); elems.add(new StatElement<Integer>( "Purgatory Hits", Integer.valueOf(purgHits) ) ); elems.add(new StatElement<Integer>( "Purgatory Size", Integer.valueOf(purgatory.size()) ) ); // get the stats from the event queue too IStats eqStats = this.cacheEventQueue.getStatistics(); elems.addAll(eqStats.getStatElements()); stats.setStatElements( elems ); return stats; }
/** * Returns semi-structured data. * <p> * @see org.apache.commons.jcs.auxiliary.AuxiliaryCache#getStatistics() */ @Override public IStats getStatistics() { IStats stats = new Stats(); stats.setTypeName( "Abstract Disk Cache" ); ArrayList<IStatElement<?>> elems = new ArrayList<IStatElement<?>>(); elems.add(new StatElement<Integer>( "Purgatory Hits", Integer.valueOf(purgHits) ) ); elems.add(new StatElement<Integer>( "Purgatory Size", Integer.valueOf(purgatory.size()) ) ); // get the stats from the event queue too IStats eqStats = this.cacheEventQueue.getStatistics(); elems.addAll(eqStats.getStatElements()); stats.setStatElements( elems ); return stats; }
/** * @return statistics about this communication */ @Override public IStats getStatistics() { IStats stats = new Stats(); stats.setTypeName( "Lateral Cache No Wait" ); ArrayList<IStatElement<?>> elems = new ArrayList<IStatElement<?>>(); // get the stats from the event queue too IStats eqStats = this.eventQueue.getStatistics(); elems.addAll(eqStats.getStatElements()); elems.add(new StatElement<Integer>( "Get Count", Integer.valueOf(this.getCount) ) ); elems.add(new StatElement<Integer>( "Remove Count", Integer.valueOf(this.removeCount) ) ); elems.add(new StatElement<Integer>( "Put Count", Integer.valueOf(this.putCount) ) ); elems.add(new StatElement<AuxiliaryCacheAttributes>( "Attributes", cache.getAuxiliaryCacheAttributes() ) ); stats.setStatElements( elems ); return stats; }
/** * @return statistics about this communication */ @Override public IStats getStatistics() { IStats stats = new Stats(); stats.setTypeName( "Lateral Cache No Wait" ); ArrayList<IStatElement<?>> elems = new ArrayList<IStatElement<?>>(); // get the stats from the event queue too IStats eqStats = this.eventQueue.getStatistics(); elems.addAll(eqStats.getStatElements()); elems.add(new StatElement<Integer>( "Get Count", Integer.valueOf(this.getCount) ) ); elems.add(new StatElement<Integer>( "Remove Count", Integer.valueOf(this.removeCount) ) ); elems.add(new StatElement<Integer>( "Put Count", Integer.valueOf(this.putCount) ) ); elems.add(new StatElement<AuxiliaryCacheAttributes>( "Attributes", cache.getAuxiliaryCacheAttributes() ) ); stats.setStatElements( elems ); return stats; }
/** * @return statistics about this communication */ @Override public IStats getStatistics() { IStats stats = new Stats(); stats.setTypeName( "Remote Cache No Wait" ); ArrayList<IStatElement<?>> elems = new ArrayList<IStatElement<?>>(); elems.add(new StatElement<CacheStatus>( "Status", getStatus() ) ); // get the stats from the cache queue too IStats cStats = this.remoteCacheClient.getStatistics(); if ( cStats != null ) { elems.addAll(cStats.getStatElements()); } // get the stats from the event queue too IStats eqStats = this.cacheEventQueue.getStatistics(); elems.addAll(eqStats.getStatElements()); elems.add(new StatElement<Integer>( "Get Count", Integer.valueOf(this.getCount) ) ); elems.add(new StatElement<Integer>( "GetMatching Count", Integer.valueOf(this.getMatchingCount) ) ); elems.add(new StatElement<Integer>( "GetMultiple Count", Integer.valueOf(this.getMultipleCount) ) ); elems.add(new StatElement<Integer>( "Remove Count", Integer.valueOf(this.removeCount) ) ); elems.add(new StatElement<Integer>( "Put Count", Integer.valueOf(this.putCount) ) ); stats.setStatElements( elems ); return stats; }
/** * @return statistics about this communication */ @Override public IStats getStatistics() { IStats stats = new Stats(); stats.setTypeName( "Remote Cache No Wait" ); ArrayList<IStatElement<?>> elems = new ArrayList<IStatElement<?>>(); elems.add(new StatElement<CacheStatus>( "Status", getStatus() ) ); // get the stats from the cache queue too IStats cStats = this.remoteCacheClient.getStatistics(); if ( cStats != null ) { elems.addAll(cStats.getStatElements()); } // get the stats from the event queue too IStats eqStats = this.cacheEventQueue.getStatistics(); elems.addAll(eqStats.getStatElements()); elems.add(new StatElement<Integer>( "Get Count", Integer.valueOf(this.getCount) ) ); elems.add(new StatElement<Integer>( "GetMatching Count", Integer.valueOf(this.getMatchingCount) ) ); elems.add(new StatElement<Integer>( "GetMultiple Count", Integer.valueOf(this.getMultipleCount) ) ); elems.add(new StatElement<Integer>( "Remove Count", Integer.valueOf(this.removeCount) ) ); elems.add(new StatElement<Integer>( "Put Count", Integer.valueOf(this.putCount) ) ); stats.setStatElements( elems ); return stats; }