net.metanotion.io
Interface BlockIO<K,D,T>

All Superinterfaces:
Closeable, Flushable
All Known Implementing Classes:
AppendBlockIO

public interface BlockIO<K,D,T>
extends Flushable, Closeable

Abstract definition of a "Block Input/Output" device. The generic type T is the type of a transaction handle returned. The generic type D is the type of the data handled by a block. The generic type K is the type of the key by which blocks are referenced. For example, a hard drive might be represented by: public class HardDrive implements BlockIO;


Method Summary
 void abort(T xid)
           
 K allocBlock()
           
 K allocBlock(T t)
           
 T begin()
           
 T begin(T parentXID)
           
 void close()
           
 void commit(T xid)
           
 void flush()
           
 void freeBlock(K block)
           
 void freeBlock(K block, T t)
           
 BlockHandle<D> getBlock(K block)
           
 BlockHandle<D> getBlock(K block, T t)
           
 boolean hasTransactions()
           
 

Method Detail

hasTransactions

boolean hasTransactions()

begin

T begin()
        throws UnsupportedOperationException
Throws:
UnsupportedOperationException

begin

T begin(T parentXID)
        throws UnsupportedOperationException
Throws:
UnsupportedOperationException

commit

void commit(T xid)
            throws UnsupportedOperationException
Throws:
UnsupportedOperationException

abort

void abort(T xid)
           throws UnsupportedOperationException
Throws:
UnsupportedOperationException

flush

void flush()
Specified by:
flush in interface Flushable

close

void close()
Specified by:
close in interface Closeable

allocBlock

K allocBlock()

allocBlock

K allocBlock(T t)

freeBlock

void freeBlock(K block)

freeBlock

void freeBlock(K block,
               T t)

getBlock

BlockHandle<D> getBlock(K block)

getBlock

BlockHandle<D> getBlock(K block,
                        T t)