src/main/java/org/vibur/dbcp/stcache/ClhmStatementCache.java
private static EvictionListener<StatementMethod, StatementHolder> getListener() {
        return new EvictionListener<StatementMethod, StatementHolder>() {
            @Override
            public void onEviction(StatementMethod statementMethod, StatementHolder statementHolder) {
                if (statementHolder.state().getAndSet(EVICTED) == AVAILABLE) {
                    quietClose(statementHolder.rawStatement());
                }
                if (logger.isTraceEnabled()) {
                    logger.trace("Evicted {}", statementHolder.rawStatement());
                }
            }
        };
    }
private static EvictionListener<StatementMethod, StatementHolder> getListener() {
        return new EvictionListener<StatementMethod, StatementHolder>() {
            @Override
            public void onEviction(StatementMethod statementMethod, StatementHolder statementHolder) {
                if (statementHolder.state().getAndSet(EVICTED) == AVAILABLE) {
                    quietClose(statementHolder.rawStatement());
                }
                if (logger.isTraceEnabled()) {
                    logger.trace("Evicted {}", statementHolder.rawStatement());
                }
            }
        };
    }
private static EvictionListener < StatementMethod , StatementHolder > getListener ( ) { return new EvictionListener < StatementMethod , StatementHolder > ( ) { @ Override public void onEviction ( StatementMethod statementMethod , StatementHolder statementHolder ) { if ( statementHolder . state ( ) . getAndSet ( EVICTED ) == AVAILABLE ) { quietClose ( statementHolder . rawStatement ( ) ) ; } if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Evicted {}" , statementHolder . rawStatement ( ) ) ; } } } ; }
Creates and returns a new EvictionListener for the CLHM. It is worth noting that this
EvictionListener is called in the context of the thread that has executed an insert (putIfAbsent)
operation which has increased the CLHM size above its maxSize - in which case the CLHM
evicts its LRU entry.

@return a new EvictionListener for the CLHM
Creates and returns a new EvictionListener for the CLHM . It is worth noting that this EvictionListener is called in the context of the thread that has executed an insert ( putIfAbsent ) operation which has increased the CLHM size above its maxSize - in which case the CLHM evicts its LRU entry .