|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hardcode.gdbms.engine.data.indexes.IndexSetImpl
public class IndexSetImpl
Implementación del conjunto de índices que guarda en memoria hasta un límite y a partir de ese límite pasa todos los índices a disco
Constructor Summary | |
---|---|
IndexSetImpl()
Creates a new IndexSetImpl object. |
|
IndexSetImpl(int limit)
Creates a new IndexSetImpl object. |
Method Summary | |
---|---|
void |
addIndex(long index)
Añade un índice al conjunto |
void |
close()
Cierra el fichero de índices |
long |
getIndex(long nth)
Devuelve el índice nth-ésimo si se invocó previamente a indexSetComplete y lanza una excepción en caso contrario |
long |
getIndexCount()
Devuelve el número de índices si se invocó previamente a indexSetComplete y lanza una excepción en caso contrario |
long[] |
getIndexes()
DOCUMENT ME! |
void |
indexSetComplete()
Cierra el conjunto de índices para el almacenamiento, a partir de una llamada a este método no se puede escribir ningún índice más, sólamente se pueden leer |
void |
open()
Abre el almacenamiento del índice para la escritura de los índices. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexSetImpl()
public IndexSetImpl(int limit)
limit
- límite a partir del cual se guardan todos los índices en
discoMethod Detail |
---|
public void addIndex(long index) throws java.io.IOException
addIndex
in interface VariableIndexSet
index
- índice a añadir
java.io.IOException
- Si se produce un error al escribir en el disco
java.lang.RuntimeException
public long getIndex(long nth) throws java.io.IOException
getIndex
in interface BaseIndexSet
nth
- índice de índice que se quiere obtener
java.io.IOException
- Si se produce un error accediendo a disco
java.lang.RuntimeException
public long getIndexCount()
getIndexCount
in interface BaseIndexSet
java.lang.RuntimeException
public void indexSetComplete() throws java.io.IOException
VariableIndexSet
indexSetComplete
in interface VariableIndexSet
java.io.IOException
- Si se produce un fallo al cerrar los streams de
salidaVariableIndexSet.indexSetComplete()
public void open() throws java.io.IOException
VariableIndexSet
open
in interface VariableIndexSet
java.io.IOException
- Si se produce un fallo al abrircom.hardcode.gdbms.engine.data.indexes.VariableIndexSet#open(java.io.File)
public void close() throws java.io.IOException
BaseIndexSet
close
in interface BaseIndexSet
java.io.IOException
- Si se produce un fallo al cerrarBaseIndexSet.close()
public long[] getIndexes() throws java.io.IOException
getIndexes
in interface VariableIndexSet
java.io.IOException
VariableIndexSet.getIndexes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |