xxl.io
Class BlockFileContainer

java.lang.Object
  |
  +--xxl.collections.Container
        |
        +--xxl.io.BlockFileContainer

public class BlockFileContainer
extends Container


Field Summary
protected  int blockSize
           
protected  java.io.RandomAccessFile container
           
protected  java.io.RandomAccessFile fat
           
protected  long freeOffset
           
protected  int size
           
 
Fields inherited from class xxl.collections.Container
FACTORY_METHOD
 
Constructor Summary
BlockFileContainer(java.lang.String prefix)
           
BlockFileContainer(java.lang.String prefix, int blockSize)
           
 
Method Summary
 void clear()
           
 void close()
           
 boolean contains(java.lang.Object id)
           
 java.lang.Object get(java.lang.Object id, boolean unfix)
           
 java.util.Iterator ids()
           
 java.lang.Object insert(java.lang.Object object, boolean unfix)
           
 void remove(java.lang.Object id)
           
 int size()
           
 void unfix(java.lang.Object id)
           
 void update(java.lang.Object id, java.lang.Object object, boolean unfix)
           
 
Methods inherited from class xxl.collections.Container
flush, flush, get, getAll, getAll, insert, insertAll, insertAll, objects, removeAll, unfixAll, update, updateAll, updateAll, updateAll, updateAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

container

protected java.io.RandomAccessFile container

fat

protected java.io.RandomAccessFile fat

blockSize

protected int blockSize

size

protected int size

freeOffset

protected long freeOffset
Constructor Detail

BlockFileContainer

public BlockFileContainer(java.lang.String prefix,
                          int blockSize)
                   throws java.io.FileNotFoundException

BlockFileContainer

public BlockFileContainer(java.lang.String prefix)
                   throws java.io.IOException
Method Detail

clear

public void clear()
Overrides:
clear in class Container

close

public void close()
Overrides:
close in class Container

contains

public boolean contains(java.lang.Object id)
Overrides:
contains in class Container

get

public java.lang.Object get(java.lang.Object id,
                            boolean unfix)
                     throws java.util.NoSuchElementException
Overrides:
get in class Container

ids

public java.util.Iterator ids()
Overrides:
ids in class Container

insert

public java.lang.Object insert(java.lang.Object object,
                               boolean unfix)
Overrides:
insert in class Container

remove

public void remove(java.lang.Object id)
            throws java.util.NoSuchElementException
Overrides:
remove in class Container

size

public int size()
Overrides:
size in class Container

unfix

public void unfix(java.lang.Object id)
           throws java.util.NoSuchElementException
Overrides:
unfix in class Container

update

public void update(java.lang.Object id,
                   java.lang.Object object,
                   boolean unfix)
            throws java.util.NoSuchElementException
Overrides:
update in class Container