class CreatedQueryLogicCacheBean {

    public boolean add(String queryId, String userId, QueryLogic<?> logic, Connector cxn) {
        Triple value = new Triple(userId, logic, cxn);
        long updateTime = System.currentTimeMillis();
        return cache.putIfAbsent(new Pair<>(queryId, updateTime), value) == null;
    }

}