@Override public void cancelAutoReclaim() { m_holder_5BC267.cancelAutoReclaim(); if (null != m_str_A55313) { m_str_A55313.cancelAutoReclaim(); } m_autoreclaim_8F4B75 = false; }
@Override public void destroy() throws RetrieveDurableEntityError { if (null != m_str_A55313) { m_str_A55313.destroy(); m_str_A55313 = null; } m_holder_5BC267.destroy(); }
@Override public void setColor(boolean color) { m_unsafe_EE978A.putByte(m_holder_E5EEE3.get() + 32, (byte) (color? 1 : 0)); }
public void syncToLocal() { if (m_dchunk.getAllocator() instanceof NonVolatileMemAllocator) { NonVolatileMemAllocator alloc = (NonVolatileMemAllocator) m_dchunk.getAllocator(); alloc.syncToLocal(m_dchunk.get() + m_offset, m_size, false); } else { throw new UnsupportedOperationException("The ChunkBuffer does not backed by a non-volatile allocator"); } }
case CHUNK: if (destroy && null != get()) { m_chunkfield.destroy(); m_chunkfield = null; m_unsafe.putAddress(m_fpos, 0L); throw new GenericTypeError("generic type is not mapped to a chunk type!"); if (((DurableChunk<A>) e).getAllocator() != m_allocator) { throw new IllegalAllocatorError("This generic chunk is allocated by another allocator!"); m_chunkfield.registerAutoReclaim(); } else { m_chunkfield.cancelAutoReclaim(); m_unsafe.putAddress(m_fpos, null == m_chunkfield ? 0L : m_chunkfield.getHandler());
@Override public void syncToNonVolatileMemory() { m_holder_2B4355.syncToNonVolatileMemory(); }
@Override public void syncToVolatileMemory() { m_holder_00EAAD.syncToVolatileMemory(); }
@Override public void syncToLocal() { m_holder_2B4355.syncToLocal(); }
@Override public void registerAutoReclaim(ReclaimContext arg0) { m_holder_5BC267.registerAutoReclaim(arg0); if (null != m_str_A55313) { m_str_A55313.registerAutoReclaim(arg0); } m_autoreclaim_8F4B75 = true; m_reclaimcontext_998750 = arg0; }
public ChunkBuffer(DurableChunk<A> dchunk, long offset, int size) { Field address, capacity; m_dchunk = dchunk; if (null != dchunk && size > 0 && offset >= 0 && offset + size <= dchunk.getSize()) { ByteBuffer bb = ByteBuffer.allocateDirect(0).order(ByteOrder.nativeOrder()); try { address = Buffer.class.getDeclaredField("address"); address.setAccessible(true); capacity = Buffer.class.getDeclaredField("capacity"); capacity.setAccessible(true); address.setLong(bb, dchunk.get() + offset); capacity.setInt(bb, size); bb.limit(size); m_buffer = bb; m_offset = offset; m_size = size; } catch (NoSuchFieldException e) { throw new ConfigurationException("Buffer fields not found."); } catch (IllegalAccessException e) { throw new ConfigurationException("Buffer fields cannot be accessed."); } } else { throw new OutOfBoundsException("The ChunkBuffer is out of bounds of its backed DurableChunk."); } }
/** * retrieve a durable chunk from its backed memory allocator. * * @param phandler * specify the handler of memory chunk to retrieve * * @param autoreclaim * specify whether this retrieved memory chunk can be reclaimed * automatically or not * * @param rctx * specify a reclaim context * * @return a durable chunk contains the retrieved memory chunk */ @Override public DurableChunk<NonVolatileMemAllocator> retrieveChunk(long phandler, boolean autoreclaim, ReclaimContext rctx) { DurableChunk<NonVolatileMemAllocator> ret = null; long eaddr = getEffectiveAddress(phandler); long sz = m_nvmasvc.retrieveSize(m_nid, eaddr); if (sz > 0L) { ret = new DurableChunk<NonVolatileMemAllocator>(this, eaddr, sz); ret.setCollector(m_chunkcollector); if (autoreclaim) { m_chunkcollector.register(ret, rctx); } } return ret; }
/** * retrieve a durable chunk from its backed memory allocator. * * @param phandler * specify the handler of memory chunk to retrieve * * @param autoreclaim * specify whether this retrieved memory chunk can be reclaimed * automatically or not * * @param rctx * specify a reclaim context * * @return a durable chunk contains the retrieved memory chunk */ @Override public DurableChunk<VolatileMemAllocator> retrieveChunk(long phandler, boolean autoreclaim, ReclaimContext rctx) { DurableChunk<VolatileMemAllocator> ret = null; long eaddr = getEffectiveAddress(phandler); long sz = m_vmasvc.retrieveSize(m_nid, eaddr); if (sz > 0L) { ret = new DurableChunk<VolatileMemAllocator>(this, eaddr, sz); if (autoreclaim) { m_chunkcollector.register(ret, rctx); } } return ret; }
public void syncToNonVolatileMemory() { if (m_dchunk.getAllocator() instanceof NonVolatileMemAllocator) { NonVolatileMemAllocator alloc = (NonVolatileMemAllocator) m_dchunk.getAllocator(); alloc.syncToNonVolatileMemory(m_dchunk.get() + m_offset, m_size, false); } else { throw new UnsupportedOperationException("The ChunkBuffer does not backed by a non-volatile allocator"); } }
@Override public void syncToNonVolatileMemory() { m_holder_00EAAD.syncToNonVolatileMemory(); }
@Override public void syncToVolatileMemory() { m_holder_5BC267.syncToVolatileMemory(); }
@Override public void syncToLocal() { m_holder_A8BF22.syncToLocal(); }
@Override public void registerAutoReclaim(ReclaimContext arg0) { m_holder_3CE8C3.registerAutoReclaim(arg0); if (null != m_name_1B779B) { m_name_1B779B.registerAutoReclaim(arg0); } m_autoreclaim_071A8E = true; m_reclaimcontext_9C2BE7 = arg0; }
ret = new DurableChunk<VolatileMemAllocator>(this, addr, size); ret.setCollector(m_chunkcollector); if (autoreclaim) { m_chunkcollector.register(ret, rctx);
mholder.clear(); mholder.destroy(); ret = new DurableChunk<VolatileMemAllocator>(this, addr, size); if (ac) { m_chunkcollector.register(ret);
@Override public void setTimestamp(Long ts, boolean destroy) throws OutOfHybridMemory, RetrieveDurableEntityError { m_unsafe_0DCC8A.putLong(m_holder_A8BF22.get() + 8, ts); }