Package be.panako.strategy.olaf.storage
Class OlafStorageKV
java.lang.Object
be.panako.strategy.olaf.storage.OlafStorageKV
- All Implemented Interfaces:
OlafStorage
public class OlafStorageKV extends java.lang.Object implements OlafStorage
-
Constructor Summary
Constructors Constructor Description OlafStorageKV() -
Method Summary
Modifier and Type Method Description voidaddToDeleteQueue(long key, int val1, int val2)voidaddToQueryQueue(long queryHash)voidaddToStoreQueue(long fingerprintHash, int resourceIdentifier, int t1)voidclear()voidclearStoreQueue()voidclose()voiddeleteMetadata(long resourceID)longentries(boolean printStats)static OlafStorageKVgetInstance()OlafResourceMetadatagetMetadata(long resourceID)voidprocessDeleteQueue()voidprocessQueryQueue(java.util.Map<java.lang.Long,java.util.List<OlafHit>> matchAccumulator, int range)voidprocessQueryQueue(java.util.Map<java.lang.Long,java.util.List<OlafHit>> matchAccumulator, int range, java.util.Set<java.lang.Integer> resourcesToAvoid)voidprocessStoreQueue()voidstoreMetadata(long resourceID, java.lang.String resourcePath, float duration, int fingerprints)Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
OlafStorageKV
public OlafStorageKV()
-
-
Method Details
-
getInstance
- Returns:
- Returns or creates a storage instance. This should be a thread safe operation.
-
close
public void close() -
storeMetadata
public void storeMetadata(long resourceID, java.lang.String resourcePath, float duration, int fingerprints)- Specified by:
storeMetadatain interfaceOlafStorage
-
getMetadata
- Specified by:
getMetadatain interfaceOlafStorage
-
addToStoreQueue
public void addToStoreQueue(long fingerprintHash, int resourceIdentifier, int t1)- Specified by:
addToStoreQueuein interfaceOlafStorage
-
processStoreQueue
public void processStoreQueue()- Specified by:
processStoreQueuein interfaceOlafStorage
-
clearStoreQueue
public void clearStoreQueue() -
addToDeleteQueue
public void addToDeleteQueue(long key, int val1, int val2) -
processDeleteQueue
public void processDeleteQueue() -
addToQueryQueue
public void addToQueryQueue(long queryHash)- Specified by:
addToQueryQueuein interfaceOlafStorage
-
processQueryQueue
public void processQueryQueue(java.util.Map<java.lang.Long,java.util.List<OlafHit>> matchAccumulator, int range)- Specified by:
processQueryQueuein interfaceOlafStorage
-
processQueryQueue
public void processQueryQueue(java.util.Map<java.lang.Long,java.util.List<OlafHit>> matchAccumulator, int range, java.util.Set<java.lang.Integer> resourcesToAvoid)- Specified by:
processQueryQueuein interfaceOlafStorage
-
entries
public long entries(boolean printStats) -
deleteMetadata
public void deleteMetadata(long resourceID) -
clear
public void clear()
-