Package be.panako.strategy.olaf.storage
Class OlafStorageFile
java.lang.Object
be.panako.strategy.olaf.storage.OlafStorageFile
- All Implemented Interfaces:
OlafStorage
public class OlafStorageFile extends java.lang.Object implements OlafStorage
-
Constructor Summary
Constructors Constructor Description OlafStorageFile()
-
Method Summary
Modifier and Type Method Description void
addToQueryQueue(long queryHash)
void
addToStoreQueue(long fingerprintHash, int resourceIdentifier, int t1)
void
clear()
long[]
dataFromLine(java.lang.String line)
static OlafStorageFile
getInstance()
OlafResourceMetadata
getMetadata(long identifier)
void
processQueryQueue(java.util.Map<java.lang.Long,java.util.List<OlafHit>> matchAccumulator, int range)
void
processQueryQueue(java.util.Map<java.lang.Long,java.util.List<OlafHit>> matchAccumulator, int range, java.util.Set<java.lang.Integer> resourcesToAvoid)
void
processStoreQueue()
void
storeMetadata(long resourceID, java.lang.String resourcePath, float duration, int fingerprints)
java.lang.String
storeQueueToString()
java.lang.String
storeQueueToString(java.util.List<long[]> queue)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
OlafStorageFile
public OlafStorageFile()
-
-
Method Details
-
getInstance
- Returns:
- Returns or creates a storage instance. This should be a thread safe operation.
-
storeMetadata
public void storeMetadata(long resourceID, java.lang.String resourcePath, float duration, int fingerprints)- 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
-
storeQueueToString
public java.lang.String storeQueueToString(java.util.List<long[]> queue) -
storeQueueToString
public java.lang.String storeQueueToString() -
processStoreQueue
public void processStoreQueue()- Specified by:
processStoreQueue
in interfaceOlafStorage
-
dataFromLine
public long[] dataFromLine(java.lang.String line) -
addToQueryQueue
public void addToQueryQueue(long queryHash)- Specified by:
addToQueryQueue
in interfaceOlafStorage
-
processQueryQueue
public void processQueryQueue(java.util.Map<java.lang.Long,java.util.List<OlafHit>> matchAccumulator, int range)- Specified by:
processQueryQueue
in 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:
processQueryQueue
in interfaceOlafStorage
-
clear
public void clear()
-