class StatementCache implements IStatementCache {

	public StatementHandle get(String key){
		StatementHandle statement = this.cache.get(key);
		
		if (statement != null && !statement.logicallyClosed.compareAndSet(true, false)){
			statement = null;
		}
		
		if (this.maintainStats){
			if (statement != null){
				this.statistics.incrementCacheHits();
			} else {
				this.statistics.incrementCacheMiss();
			}
		}
		return statement;
	}

	public  StatementCache(int size, boolean maintainStats, Statistics statistics);

}