@Override protected Value getValueInternal(final byte[] id, final boolean p) throws DataAccessLayerException { final ByteBuffer key = ByteBuffer.wrap(id); Value value = _id2node_cache.get(key); if (value == null) { value = _decoratee.getValue(id, p); _cacheStrategy.cacheId(key, value); } else { _valueHitsCount.incrementAndGet(); } return value; }
@Override protected byte[] getIdInternal(final String value, final boolean p) throws DataAccessLayerException { byte[] id = _node2id_cache.get(value); if (id == null) { id = _decoratee.getID(value, p); _cacheStrategy.cacheValue(value, id); } else { _idHitsCount.incrementAndGet(); } return id; }
@Override protected byte[] getIdInternal(final Value value, final boolean p) throws DataAccessLayerException { byte[] id = _node2id_cache.get(value); if (id == null) { id = _decoratee.getID(value, p); _cacheStrategy.cacheValue(value, id); } else { _idHitsCount.incrementAndGet(); } return id; }
@Override protected String getValueInternal(final byte[] id, final boolean p) throws DataAccessLayerException { final ByteBuffer key = ByteBuffer.wrap(id); String value = _id2node_cache.get(key); if (value == null) { value = _decoratee.getValue(id, p); _cacheStrategy.cacheId(key, value); } else { _valueHitsCount.incrementAndGet(); } return value; }
@Override protected byte[] getIdInternal(final Value value, final boolean p) throws DataAccessLayerException { byte[] id = _node2id_cache.get(value); if (id == null) { id = _decoratee.getID(value, p); _cacheStrategy.cacheValue(value, id); } else { _idHitsCount.incrementAndGet(); } return id; }
@Override protected Value getValueInternal(final byte[] id, final boolean p) throws DataAccessLayerException { final ByteBuffer key = ByteBuffer.wrap(id); Value value = _id2node_cache.get(key); if (value == null) { value = _decoratee.getValue(id, p); _cacheStrategy.cacheId(key, value); } else { _valueHitsCount.incrementAndGet(); } return value; }
@Override protected byte[] getIdInternal(final String value, final boolean p) throws DataAccessLayerException { byte[] id = _node2id_cache.get(value); if (id == null) { id = _decoratee.getID(value, p); _cacheStrategy.cacheValue(value, id); } else { _idHitsCount.incrementAndGet(); } return id; }
@Override protected String getValueInternal(final byte[] id, final boolean p) throws DataAccessLayerException { final ByteBuffer key = ByteBuffer.wrap(id); String value = _id2node_cache.get(key); if (value == null) { value = _decoratee.getValue(id, p); _cacheStrategy.cacheId(key, value); } else { _valueHitsCount.incrementAndGet(); } return value; }