Package org.eclipse.net4j.util.io
Class SortedFileMap<K extends java.lang.Comparable<K>,V>
- java.lang.Object
- 
- org.eclipse.net4j.util.io.SortedFileMap<K,V>
 
- 
- All Implemented Interfaces:
- java.io.Closeable,- java.lang.AutoCloseable
 - Direct Known Subclasses:
- CachedFileMap
 
 public abstract class SortedFileMap<K extends java.lang.Comparable<K>,V> extends java.lang.Object implements java.io.Closeable- Author:
- Eike Stepper
 
- 
- 
Constructor SummaryConstructors Constructor Description SortedFileMap(java.io.File file, java.lang.String mode)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()Vget(K key)longgetEntryCount()intgetEntrySize()java.io.FilegetFile()KgetKey(long index)abstract intgetKeySize()KgetMaxKey()longgetPosition(long index)java.io.RandomAccessFilegetRandomAccessFile()VgetValue(long index)longgetValuePosition(long index)abstract intgetValueSize()Vput(K key, V value)protected abstract KreadKey(ExtendedDataInput in)protected abstract VreadValue(ExtendedDataInput in)protected longsearch(K key)protected abstract voidwriteKey(ExtendedDataOutput out, K key)protected abstract voidwriteValue(ExtendedDataOutput out, V value)
 
- 
- 
- 
Method Detail- 
closepublic void close() throws java.io.IOException- Specified by:
- closein interface- java.lang.AutoCloseable
- Specified by:
- closein interface- java.io.Closeable
- Throws:
- java.io.IOException
 
 - 
getFilepublic java.io.File getFile() 
 - 
getRandomAccessFilepublic java.io.RandomAccessFile getRandomAccessFile() 
 - 
getEntryCountpublic long getEntryCount() 
 - 
getEntrySizepublic int getEntrySize() 
 - 
getPositionpublic long getPosition(long index) 
 - 
getValuePositionpublic long getValuePosition(long index) 
 - 
getMaxKeypublic K getMaxKey() 
 - 
getKeypublic K getKey(long index) 
 - 
getValuepublic V getValue(long index) 
 - 
searchprotected long search(K key) throws java.io.IOException - Returns:
- The index of the entry with the given key if the key exists, -(insertionIndex + 1)otherwise.
- Throws:
- java.io.IOException
 
 - 
getKeySizepublic abstract int getKeySize() 
 - 
readKeyprotected abstract K readKey(ExtendedDataInput in) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
writeKeyprotected abstract void writeKey(ExtendedDataOutput out, K key) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
getValueSizepublic abstract int getValueSize() 
 - 
readValueprotected abstract V readValue(ExtendedDataInput in) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
writeValueprotected abstract void writeValue(ExtendedDataOutput out, V value) throws java.io.IOException - Throws:
- java.io.IOException
 
 
- 
 
-