public class IndirectDataset extends Dataset
Class provides extra methods to assess status of readers and to evaluate the caches.
| Modifier and Type | Field and Description |
|---|---|
Pool |
pool
A pool of data readers.
|
protected SourceBase |
source
Data source to be used with the pool.
|
age, components, copyright, copyrightOffset, csvBufferLength, deviceCombinations, export, FindProfilesInitialiseValueProfiles, format, formatOffset, highestCharacter, jsonBufferLength, lastModified, lowestCharacter, maps, maximumRank, maxSignatures, maxSignaturesClosest, maxUserAgentLength, maxValues, minUserAgentCount, minUserAgentLength, mode, nameOffset, nextUpdate, nodeRankedSignatureIndexes, nodes, profileOffsets, profiles, properties, published, rankedSignatureIndexes, rootNodes, signatureNodeOffsets, signatureNodesCount, signatureProfilesCount, signatures, strings, tag, values, version, versionEnum, xmlBufferLength| Constructor and Description |
|---|
IndirectDataset(byte[] data,
Modes mode)
Creates a dataset object with a pool of readers used to retrieve data
from the data file represented as an array of bytes.
|
IndirectDataset(String fileName,
Date lastModified,
Modes mode,
boolean isTempFile)
Creates a dataset object with a pool of readers used to retrieve data
from the data file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Dispose of the dataset and the pool of readers.
|
ICache |
getCache(DatasetBuilder.CacheType cacheType)
Returns a cache to allow examination of its performance
|
int |
getReadersCreated() |
int |
getReadersQueued() |
void |
resetCache()
Resets the caches for the data set.
|
void |
setCacheMap(Map<DatasetBuilder.CacheType,ICache> cacheMap)
Sets the caches to use in this dataset
|
findProfile, findProfiles, findProfiles, get, getAge, getBrowsers, getComponent, getComponents, getCopyright, getCrawlers, getDisposed, getFormat, getHardware, getHttpHeaders, getJavaScriptProperties, getMaps, getMaximumRank, getMinUserAgentLength, getName, getNodeCacheSwitches, getNodeRankedSignatureIndexes, getNodes, getNodesCount, getPercentageNodeCacheMisses, getPercentageProfilesCacheMisses, getPercentageRankedSignatureCacheMisses, getPercentageSignatureCacheMisses, getPercentageStringsCacheMisses, getPercentageValuesCacheMisses, getProfiles, getProfilesCacheSwitches, getProfilesCount, getProperties, getPropertyByName, getPropertyValueOverrideProperties, getRankedSignatureCacheSwitches, getRankedSignatureIndexes, getSignatureCacheSwitches, getSignatureNodeOffsets, getSignatures, getSoftware, getStringsCacheSwitches, getValues, getValuesCacheSwitches, init, initComponents, initNodes, initProfiles, initProperties, initSignatures, initValuespublic final Pool pool
protected final SourceBase source
public IndirectDataset(String fileName, Date lastModified, Modes mode, boolean isTempFile) throws IOException
lastModified - Date and time the source data was last modified.fileName - Valid path to the uncompressed data set file.mode - Mode The mode of operation the data set will be using.isTempFile - True if the file should be deleted when the source is
disposedIOException - if there was a problem accessing data file.public IndirectDataset(byte[] data,
Modes mode)
throws IOException
data - array of bytes to read from.mode - The mode of operation the data set will be using.IOException - if there was a problem accessing data file.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class DatasetIOException - if there was a problem accessing data file.public int getReadersCreated()
public int getReadersQueued()
public void resetCache()
resetCache in class Datasetpublic ICache getCache(DatasetBuilder.CacheType cacheType)
cacheType - the type of cachepublic void setCacheMap(Map<DatasetBuilder.CacheType,ICache> cacheMap)
cacheMap - a Map of caches to useCopyright © 2017 51Degrees. All rights reserved.