net.metanotion.io.appenddb
Class Transaction

java.lang.Object
  extended by net.metanotion.io.appenddb.Transaction
All Implemented Interfaces:
ByteGet

public final class Transaction
extends Object
implements ByteGet


Field Summary
protected  ConcurrentHashMap<Integer,net.metanotion.io.appenddb.BlockThunk> blockAddresses
           
protected  AtomicBoolean closed
           
protected  BlockDB owner
           
protected  net.metanotion.io.appenddb.BlockRootMap root
           
 
Constructor Summary
Transaction(BlockDB owner)
           
 
Method Summary
protected  void abort()
           
protected  Integer alloc()
           
 void commit()
           
protected  BlockHandle<byte[]> get(Integer block)
           
 byte[] getBytes(int block)
           
protected  void remove(Integer block)
           
 void setBytes(int block, byte[] d)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

protected final BlockDB owner

closed

protected final AtomicBoolean closed

blockAddresses

protected final ConcurrentHashMap<Integer,net.metanotion.io.appenddb.BlockThunk> blockAddresses

root

protected final net.metanotion.io.appenddb.BlockRootMap root
Constructor Detail

Transaction

public Transaction(BlockDB owner)
Method Detail

remove

protected void remove(Integer block)

abort

protected void abort()

alloc

protected Integer alloc()

get

protected BlockHandle<byte[]> get(Integer block)

setBytes

public void setBytes(int block,
                     byte[] d)
Specified by:
setBytes in interface ByteGet

getBytes

public byte[] getBytes(int block)
Specified by:
getBytes in interface ByteGet

commit

public void commit()