com.mobixess.jodb.core.index
Class JODBIndexingAgent

java.lang.Object
  extended by com.mobixess.jodb.core.agent.JODBAgent
      extended by com.mobixess.jodb.core.index.JODBIndexingAgent

public class JODBIndexingAgent
extends JODBAgent


Constructor Summary
JODBIndexingAgent()
           
JODBIndexingAgent(java.lang.reflect.Field field, JODBOperationContext context)
           
 
Method Summary
 int binarySearch(java.nio.ByteBuffer key)
           
 int compareTo(java.nio.ByteBuffer thisKey, java.nio.ByteBuffer that)
          Compares this buffer to another.
 long getChunkForIndex(int index)
           
 int getClassId()
           
 int getFieldId()
           
 IndexDataIterator getIndexIterator(boolean isForwardIterator)
           
 void insertIndex(long offsetId, java.nio.ByteBuffer value, JODBOperationContext context)
           
 int linearIdSearch(long id)
           
 boolean removeIndex(long objectId, java.nio.ByteBuffer value, JODBOperationContext context)
           
 int searchIndex(java.nio.ByteBuffer key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JODBIndexingAgent

public JODBIndexingAgent()

JODBIndexingAgent

public JODBIndexingAgent(java.lang.reflect.Field field,
                         JODBOperationContext context)
                  throws JodbIOException
Parameters:
fieldId -
Throws:
JodbIOException
Method Detail

getFieldId

public int getFieldId()

getClassId

public int getClassId()

insertIndex

public void insertIndex(long offsetId,
                        java.nio.ByteBuffer value,
                        JODBOperationContext context)
                 throws java.io.IOException
Throws:
java.io.IOException

removeIndex

public boolean removeIndex(long objectId,
                           java.nio.ByteBuffer value,
                           JODBOperationContext context)
                    throws java.io.IOException
Throws:
java.io.IOException

getChunkForIndex

public final long getChunkForIndex(int index)
Parameters:
index -
Returns:
-1 means need chunk append

linearIdSearch

public int linearIdSearch(long id)

searchIndex

public int searchIndex(java.nio.ByteBuffer key)
                throws java.io.IOException
Throws:
java.io.IOException

binarySearch

public int binarySearch(java.nio.ByteBuffer key)
                 throws java.io.IOException
Throws:
java.io.IOException

compareTo

public int compareTo(java.nio.ByteBuffer thisKey,
                     java.nio.ByteBuffer that)
              throws java.io.IOException
Compares this buffer to another.

Two byte buffers are compared by comparing their sequences of remaining elements lexicographically, without regard to the starting position of each sequence within its corresponding buffer.

A byte buffer is not comparable to any other type of object.

Returns:
A negative integer, zero, or a positive integer as this buffer is less than, equal to, or greater than the given buffer
Throws:
java.io.IOException

getIndexIterator

public IndexDataIterator getIndexIterator(boolean isForwardIterator)


Copyright © Mobixess Inc. All Rights Reserved.