Package be.panako.strategy.olaf.storage
Class OlafStorageKV
java.lang.Object
be.panako.strategy.olaf.storage.OlafStorageKV
- All Implemented Interfaces:
OlafStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToDeleteQueue
(long key, int val1, int val2) void
addToQueryQueue
(long queryHash) void
addToStoreQueue
(long fingerprintHash, int resourceIdentifier, int t1) void
clear()
void
void
close()
void
deleteMetadata
(long resourceID) long
entries
(boolean printStats) static OlafStorageKV
getMetadata
(long resourceID) void
void
processQueryQueue
(Map<Long, List<OlafHit>> matchAccumulator, int range) void
processQueryQueue
(Map<Long, List<OlafHit>> matchAccumulator, int range, Set<Integer> resourcesToAvoid) void
void
storeMetadata
(long resourceID, String resourcePath, float duration, int fingerprints)
-
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
- Specified by:
storeMetadata
in interfaceOlafStorage
-
getMetadata
- Specified by:
getMetadata
in interfaceOlafStorage
-
addToStoreQueue
public void addToStoreQueue(long fingerprintHash, int resourceIdentifier, int t1) - Specified by:
addToStoreQueue
in interfaceOlafStorage
-
processStoreQueue
public void processStoreQueue()- Specified by:
processStoreQueue
in 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:
addToQueryQueue
in interfaceOlafStorage
-
processQueryQueue
- Specified by:
processQueryQueue
in interfaceOlafStorage
-
processQueryQueue
public void processQueryQueue(Map<Long, List<OlafHit>> matchAccumulator, int range, Set<Integer> resourcesToAvoid) - Specified by:
processQueryQueue
in interfaceOlafStorage
-
entries
public long entries(boolean printStats) -
deleteMetadata
public void deleteMetadata(long resourceID) -
clear
public void clear()
-