Package one.nio.mem
Class SharedMemoryStringMap<V>
- java.lang.Object
-
- one.nio.mem.OffheapMap<K,V>
-
- one.nio.mem.SharedMemoryMap<String,V>
-
- one.nio.mem.SharedMemoryStringMap<V>
-
- All Implemented Interfaces:
OffheapMapMXBean,SharedMemoryMapMXBean
public class SharedMemoryStringMap<V> extends SharedMemoryMap<String,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class one.nio.mem.OffheapMap
OffheapMap.BasicCleanup, OffheapMap.Record<K,V>, OffheapMap.SamplingCleanup, OffheapMap.Visitor<K,V>, OffheapMap.WritableRecord<K,V>, OffheapMap.WritableVisitor<K,V>
-
-
Field Summary
-
Fields inherited from class one.nio.mem.SharedMemoryMap
allocator, BASE_OFFSET, CAPACITY_OFFSET, className, CUSTOM_DATA_OFFSET, CUSTOM_SIZE_OFFSET, MAP_OFFSET, MAX_CUSTOM_DATA_SIZE, mmap, name, serializer, SIGNATURE_CLEAR, SIGNATURE_DIRTY, SIGNATURE_LEGACY, SIGNATURE_OFFSET, TIMESTAMP_OFFSET, UID_OFFSET
-
Fields inherited from class one.nio.mem.OffheapMap
byteArrayOffset, capacity, cleanupInterval, cleanupThread, cleanupThreshold, CONCURRENCY_LEVEL, count, expirations, HASH_OFFSET, HEADER_SIZE, locks, lockWaitTime, log, mapBase, maxSamples, MB, minTimeToLive, NEXT_OFFSET, TIME_OFFSET, timeToLive, unsafe
-
-
Constructor Summary
Constructors Constructor Description SharedMemoryStringMap(int capacity, String fileName, long fileSize)SharedMemoryStringMap(int capacity, String fileName, long fileSize, long expirationTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longallocateEntry(String key, long hashCode, int size)protected booleanequalsAt(long entry, String key)protected longhashCode(String key)protected intheaderSize(long entry)protected StringkeyAt(long entry)-
Methods inherited from class one.nio.mem.SharedMemoryMap
closeInternal, convert, createAllocator, destroyEntry, entriesToClean, getCustomData, getFreeMemory, getHeader, getTotalMemory, getUsedMemory, loadSchema, needCleanup, relocate, setCustomData, setHeader, setSerializer, setSerializer, setValueAt, sizeOf, sizeOf, storeSchema, valueAt
-
Methods inherited from class one.nio.mem.OffheapMap
bucketFor, clear, close, get, getCapacity, getCleanupInterval, getCleanupThreshold, getCount, getExpirations, getLockWaitTime, getMaxSamples, getMinTimeToLive, getTimeToLive, isExpired, iterate, iterate, iterate, iterate, iterate, iterate, lockFor, lockRecordForRead, lockRecordForRead, lockRecordForWrite, lockRecordForWrite, put, putIfAbsent, remove, removeExpired, reuseEntry, setCleanupInterval, setCleanupThreshold, setLockWaitTime, setMaxSamples, setMinTimeToLive, setTimeAt, setTimeAt, setTimeToLive, shouldCleanup, timeAt, touch
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface one.nio.mem.OffheapMapMXBean
getCapacity, getCleanupInterval, getCleanupThreshold, getCount, getExpirations, getLockWaitTime, getMaxSamples, getMinTimeToLive, getTimeToLive, setCleanupInterval, setCleanupThreshold, setLockWaitTime, setMaxSamples, setMinTimeToLive, setTimeToLive
-
-
-
-
Constructor Detail
-
SharedMemoryStringMap
public SharedMemoryStringMap(int capacity, String fileName, long fileSize) throws IOException- Throws:
IOException
-
SharedMemoryStringMap
public SharedMemoryStringMap(int capacity, String fileName, long fileSize, long expirationTime) throws IOException- Throws:
IOException
-
-
Method Detail
-
keyAt
protected String keyAt(long entry)
- Overrides:
keyAtin classOffheapMap<String,V>
-
hashCode
protected long hashCode(String key)
- Specified by:
hashCodein classOffheapMap<String,V>
-
equalsAt
protected boolean equalsAt(long entry, String key)- Specified by:
equalsAtin classOffheapMap<String,V>
-
allocateEntry
protected long allocateEntry(String key, long hashCode, int size)
- Overrides:
allocateEntryin classSharedMemoryMap<String,V>
-
headerSize
protected int headerSize(long entry)
- Overrides:
headerSizein classSharedMemoryMap<String,V>
-
-