dk.vajhoej.isam.local
Interface NativeIsam


public interface NativeIsam

Interface NativeIsamt represents the native implementation of the local ISAM source.


Field Summary
static int COMP_GE
          Greater than or equal.
static int COMP_GT
          Greater than.
static int COMP_LE
          Less than or equal.
static int COMP_LT
          Less than.
 
Method Summary
 void close()
          Close.
 int create(byte[] buf)
          Create new record.
 int delete(int ix, java.lang.Object k)
          Delete record by key.
 int find(int ix, java.lang.Object k, int comp, byte[] buf)
          Search for record by key.
 int findnext(byte[] buf)
          Next/previous record (GE and GT => next, LE and LT => previous).
 void open(java.lang.String fnm, boolean readonly)
          Open isam file.
 int read(int ix, java.lang.Object k, byte[] buf)
          Read record by key.
 boolean supportModWithoutLock()
          Does this implementation support modification of records without lock.
 boolean supportReverse()
          Does this implementation support reverse find for LE and LT.
 int update(byte[] buf)
          Update existing record.
 int update(byte[] buf, int ix, java.lang.Object k)
          Update existing record and do locking first.
 

Field Detail

COMP_GE

static final int COMP_GE
Greater than or equal.

See Also:
Constant Field Values

COMP_GT

static final int COMP_GT
Greater than.

See Also:
Constant Field Values

COMP_LE

static final int COMP_LE
Less than or equal.

See Also:
Constant Field Values

COMP_LT

static final int COMP_LT
Less than.

See Also:
Constant Field Values
Method Detail

open

void open(java.lang.String fnm,
          boolean readonly)
          throws IsamException
Open isam file.

Parameters:
fnm - file name
readonly - readonly mode
Throws:
IsamException - if problem

read

int read(int ix,
         java.lang.Object k,
         byte[] buf)
         throws IsamException
Read record by key.

Parameters:
ix - key index
k - key value
buf - buffer to receive data
Returns:
status (less than or equal zero => error)
Throws:
IsamException - if problem

create

int create(byte[] buf)
           throws IsamException
Create new record.

Parameters:
buf - buffer with data
Returns:
status (less than or equal zero => error)
Throws:
IsamException

update

int update(byte[] buf)
           throws IsamException
Update existing record.

Parameters:
buf - buffer with data
Returns:
status (less than or equal zero => error)
Throws:
IsamException - if problem

update

int update(byte[] buf,
           int ix,
           java.lang.Object k)
           throws IsamException
Update existing record and do locking first.

Parameters:
ix - key index
k - key value
buf - buffer with data
Returns:
status (less than or equal zero => error)
Throws:
IsamException - if problem

delete

int delete(int ix,
           java.lang.Object k)
           throws IsamException
Delete record by key.

Parameters:
ix - key index
k - key value
Returns:
status (less than or equal zero => error)
Throws:
IsamException - if problem

find

int find(int ix,
         java.lang.Object k,
         int comp,
         byte[] buf)
         throws IsamException
Search for record by key.

Parameters:
ix - key index
k - key value
comp - key comparison
buf - buffer to receive data
Returns:
status (less than or equal zero => error)
Throws:
IsamException - if problem

findnext

int findnext(byte[] buf)
             throws IsamException
Next/previous record (GE and GT => next, LE and LT => previous).

Parameters:
buf - buffer to receive data
Returns:
status (less than or equal zero => error)
Throws:
IsamException - if problem

close

void close()
           throws IsamException
Close.

Throws:
IsamException - if problem

supportReverse

boolean supportReverse()
Does this implementation support reverse find for LE and LT.

Returns:
true or false

supportModWithoutLock

boolean supportModWithoutLock()
Does this implementation support modification of records without lock.

Returns:
true or false