Ejemplo n.º 1
0
        public sealed override ByteArrayBuffer ReadBufferById(Transaction transaction, int
                                                              id, bool lastCommitted)
        {
            if (lastCommitted || _bypassSlotCache)
            {
                return(FetchSlotBuffer(transaction, id, lastCommitted));
            }
            ByteArrayBuffer cached = _clientSlotCache.Get(transaction, id);

            if (cached != null)
            {
                return(cached);
            }
            ByteArrayBuffer slot = FetchSlotBuffer(transaction, id, lastCommitted);

            _clientSlotCache.Add(transaction, id, slot);
            return(slot);
        }
 private void ContributeToCache(int id, ByteArrayBuffer slot)
 {
     _slotCache.Add(_transaction, id, slot);
 }