Interface IResourceStore<K extends Comparable<? super K>,V extends IResource,VF extends IResourceStore.ResourceField,F extends ResourceFilter<? super V>>
- Type Parameters:
K
- Key typeV
- Resource typeVF
- Resource value field enum typeF
- Resource filter type
- All Superinterfaces:
IDataStore<K,
,V, VF, F> Map<K,
V>
- All Known Subinterfaces:
ICommandStreamStore
,IDataStreamStore
,IDeploymentStore
,IFeatureStore
,IFeatureStoreBase<V,
,VF, F> IFoiStore
,IProcedureStore
,IPropertyStore
,ISystemDescStore
- All Known Implementing Classes:
EmptyCommandStreamStore
,EmptyDataStreamStore
,EmptyDeploymentStore
,EmptyFeatureBaseStore
,EmptyFoiStore
,EmptyProcedureStore
,EmptyPropertyStore
,EmptyResourceStore
,EmptySystemStore
public interface IResourceStore<K extends Comparable<? super K>,V extends IResource,VF extends IResourceStore.ResourceField,F extends ResourceFilter<? super V>>
extends IDataStore<K,V,VF,F>
Generic interface for all resource stores
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionAdd a new resource to the store, generating a new key for itdefault F
Methods inherited from interface org.sensorhub.api.datastore.IDataStore
backup, commit, containsKey, containsValue, countMatchingEntries, entrySet, getDatastoreName, getNumRecords, isEmpty, isReadOnly, keySet, putAll, removeEntries, restore, select, select, select, selectEntries, selectEntries, selectEntries, selectKeys, size, values
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, equals, forEach, get, getOrDefault, hashCode, merge, put, putIfAbsent, remove, remove, replace, replace, replaceAll
-
Method Details
-
add
Add a new resource to the store, generating a new key for it- Parameters:
value
- New resource object- Returns:
- The newly allocated key (internal ID)
- Throws:
DataStoreException
- if the resource already exists
-
filterBuilder
ResourceFilter.ResourceFilterBuilder<?,?, filterBuilder()F> - Returns:
- A builder for a filter compatible with this datastore
-
selectAllFilter
- Specified by:
selectAllFilter
in interfaceIDataStore<K extends Comparable<? super K>,
V extends IResource, VF extends IResourceStore.ResourceField, F extends ResourceFilter<? super V>> - Returns:
- The filter to use to select all records
-