com.caucho.db.index
Class IndexCache

java.lang.Object
  extended by com.caucho.db.index.IndexCache

public final class IndexCache
extends java.lang.Object

Manages the block cache


Method Summary
static IndexCache create()
          Returns the block manager, ensuring a minimum number of entries.
 void delete(BTree btree, byte[] buffer, int offset, int length, DbTransaction xa)
          Remove the index entry.
static IndexCache getCurrent()
           
 void insert(BTree btree, byte[] buffer, int offset, int length, long value, DbTransaction xa)
          Gets the index entry.
 long lookup(BTree btree, byte[] buffer, int offset, int length, DbTransaction xa)
          Gets the index entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static IndexCache create()
Returns the block manager, ensuring a minimum number of entries.


getCurrent

public static IndexCache getCurrent()

lookup

public long lookup(BTree btree,
                   byte[] buffer,
                   int offset,
                   int length,
                   DbTransaction xa)
            throws java.sql.SQLException
Gets the index entry.

Throws:
java.sql.SQLException

insert

public void insert(BTree btree,
                   byte[] buffer,
                   int offset,
                   int length,
                   long value,
                   DbTransaction xa)
            throws java.sql.SQLException
Gets the index entry.

Throws:
java.sql.SQLException

delete

public void delete(BTree btree,
                   byte[] buffer,
                   int offset,
                   int length,
                   DbTransaction xa)
            throws java.sql.SQLException
Remove the index entry.

Throws:
java.sql.SQLException