private void initCache() { logger.info("flushing cache"); cache = new SimpleLRUCache<>(this.cacheSize); }
private void localCacheInit() { if (localCache != null) { statsCollector.recordLevel(CACHE_SIZE_AT_FLUSH, this.localCache.size()); } localCache = new SimpleLRUCache<>(this.localCacheSize); }
private void initCache() { logger.info("flushing cache"); cache = new SimpleLRUCache<>(this.cacheSize); }
private void initCache() { logger.info("flushing cache"); cache = new SimpleLRUCache<>(this.cacheSize); }
private void localCacheInit() { if (localCache!=null) { statsCollector.recordLevel(CACHE_SIZE_AT_FLUSH, this.localCache.size()); } localCache = new SimpleLRUCache<>(this.localCacheSize); }
private void localCacheInit() { if (localCache != null) { statsCollector.recordLevel(CACHE_SIZE_AT_FLUSH, this.localCache.size()); } localCache = new SimpleLRUCache<>(this.localCacheSize); }
public CharBuf addBigDecimal( BigDecimal key ) { if (bigDCache == null) { bigDCache = new SimpleLRUCache<> ( 100 ); } char [] chars = bigDCache.get ( key ); if ( chars == null ) { String str = key.toString(); chars = FastStringUtils.toCharArray ( str ); bigDCache.put ( key, chars ); } add ( chars ); return this; }
public final CharBuf addFloat( Float key ) { if (fcache == null) { fcache = new SimpleLRUCache<> ( 100 ); } char [] chars = fcache.get ( key ); if ( chars == null ) { String str = Float.toString ( key ); chars = FastStringUtils.toCharArray ( str ); fcache.put ( key, chars ); } add ( chars ); return this; }
public final CharBuf addInt( Integer key ) { if (icache == null) { icache = new SimpleLRUCache<> ( 1000 ); } char [] chars = icache.get ( key ); if ( chars == null ) { String str = Integer.toString ( key ); chars = FastStringUtils.toCharArray ( str ); icache.put ( key, chars ); } addChars ( chars ); return this; }
public final CharBuf addDouble( Double key ) { if (dcache == null) { dcache = new SimpleLRUCache<> ( 100 ); } char [] chars = dcache.get ( key ); if ( chars == null ) { String str = Double.toString ( key ); chars = FastStringUtils.toCharArray ( str ); dcache.put ( key, chars ); } add ( chars ); return this; }
public final CharBuf addFloat( Float key ) { if (fcache == null) { fcache = new SimpleLRUCache<> ( 100 ); } char [] chars = fcache.get ( key ); if ( chars == null ) { String str = Float.toString ( key ); chars = FastStringUtils.toCharArray ( str ); fcache.put ( key, chars ); } add ( chars ); return this; }
public CharBuf addBigDecimal( BigDecimal key ) { if (bigDCache == null) { bigDCache = new SimpleLRUCache<> ( 100 ); } char [] chars = bigDCache.get ( key ); if ( chars == null ) { String str = key.toString(); chars = FastStringUtils.toCharArray ( str ); bigDCache.put ( key, chars ); } add ( chars ); return this; }
public final CharBuf addDouble( Double key ) { if (dcache == null) { dcache = new SimpleLRUCache<> ( 100 ); } char [] chars = dcache.get ( key ); if ( chars == null ) { String str = Double.toString ( key ); chars = FastStringUtils.toCharArray ( str ); dcache.put ( key, chars ); } add ( chars ); return this; }
public CharBuf addBigInteger( BigInteger key ) { if (bigICache == null) { bigICache = new SimpleLRUCache<> ( 100 ); } char [] chars = bigICache.get ( key ); if ( chars == null ) { String str = key.toString(); chars = FastStringUtils.toCharArray ( str ); bigICache.put ( key, chars ); } add ( chars ); return this; }
public final CharBuf addLong( Long key ) { if (lcache == null) { lcache = new SimpleLRUCache<> ( 100 ); } char [] chars = lcache.get ( key ); if ( chars == null ) { String str = Long.toString ( key ); chars = FastStringUtils.toCharArray ( str ); lcache.put ( key, chars ); } add ( chars ); return this; }
public final CharBuf addInt( Integer key ) { if (icache == null) { icache = new SimpleLRUCache<> ( 1000 ); } char [] chars = icache.get ( key ); if ( chars == null ) { String str = Integer.toString ( key ); chars = FastStringUtils.toCharArray ( str ); icache.put ( key, chars ); } addChars ( chars ); return this; }
public CharBuf addBigInteger( BigInteger key ) { if (bigICache == null) { bigICache = new SimpleLRUCache<> ( 100 ); } char [] chars = bigICache.get ( key ); if ( chars == null ) { String str = key.toString(); chars = FastStringUtils.toCharArray ( str ); bigICache.put ( key, chars ); } add ( chars ); return this; }
public final CharBuf addLong( Long key ) { if (lcache == null) { lcache = new SimpleLRUCache<> ( 100 ); } char [] chars = lcache.get ( key ); if ( chars == null ) { String str = Long.toString ( key ); chars = FastStringUtils.toCharArray ( str ); lcache.put ( key, chars ); } add ( chars ); return this; }
public CharBuf addCurrency( Currency key ) { if (currencyCache == null) { currencyCache = new SimpleLRUCache<> ( 100 ); } char [] chars = currencyCache.get ( key ); if ( chars == null ) { String str = '"' + key.toString() + '"'; chars = FastStringUtils.toCharArray ( str ); currencyCache.put ( key, chars ); } add ( chars ); return this; }
public CharBuf addCurrency( Currency key ) { if (currencyCache == null) { currencyCache = new SimpleLRUCache<> ( 100 ); } char [] chars = currencyCache.get ( key ); if ( chars == null ) { String str = '"' + key.toString() + '"'; chars = FastStringUtils.toCharArray ( str ); currencyCache.put ( key, chars ); } add ( chars ); return this; }