Package org.eclipse.net4j.util.io
Class SortedFileMap<K extends Comparable<K>,V>
java.lang.Object
org.eclipse.net4j.util.io.SortedFileMap<K,V>
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
CachedFileMap
- Author:
- Eike Stepper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
int
getFile()
getKey
(long index) abstract int
long
getPosition
(long index) getValue
(long index) long
getValuePosition
(long index) abstract int
protected abstract K
protected abstract V
protected long
protected abstract void
writeKey
(ExtendedDataOutput out, K key) protected abstract void
writeValue
(ExtendedDataOutput out, V value)
-
Constructor Details
-
SortedFileMap
- See Also:
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getFile
-
getRandomAccessFile
-
getEntryCount
public long getEntryCount() -
getEntrySize
public int getEntrySize() -
getPosition
public long getPosition(long index) -
getValuePosition
public long getValuePosition(long index) -
getMaxKey
-
getKey
-
getValue
-
get
-
put
-
search
- Returns:
- The index of the entry with the given key if the key exists,
-(insertionIndex + 1)
otherwise. - Throws:
IOException
-
getKeySize
public abstract int getKeySize() -
readKey
- Throws:
IOException
-
writeKey
- Throws:
IOException
-
getValueSize
public abstract int getValueSize() -
readValue
- Throws:
IOException
-
writeValue
- Throws:
IOException
-