Class EmptyResourceStore<K extends Comparable<? super K>,V extends IResource,VF extends IResourceStore.ResourceField,F extends ResourceFilter<? super V>>
java.lang.Object
org.sensorhub.impl.datastore.ReadOnlyDataStore<K,V,VF,Q>
org.sensorhub.impl.datastore.EmptyDataStore<K,V,VF,F>
org.sensorhub.api.datastore.resource.EmptyResourceStore<K,V,VF,F>
- Type Parameters:
K
- Key typeV
- Resource typeVF
- Resource value field enum typeF
- Resource filter type
- All Implemented Interfaces:
Map<K,
,V> IDataStore<K,
,V, VF, F> IResourceStore<K,
V, VF, F>
- Direct Known Subclasses:
EmptyCommandStreamStore
,EmptyDataStreamStore
,EmptyFeatureBaseStore
,EmptyPropertyStore
public abstract class EmptyResourceStore<K extends Comparable<? super K>,V extends IResource,VF extends IResourceStore.ResourceField,F extends ResourceFilter<? super V>>
extends org.sensorhub.impl.datastore.EmptyDataStore<K,V,VF,F>
implements IResourceStore<K,V,VF,F>
Helper class to implement databases that don't support all datastores
- Since:
- Jun 22, 2023
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.sensorhub.api.datastore.resource.IResourceStore
IResourceStore.ResourceField
-
Field Summary
Fields inherited from class org.sensorhub.impl.datastore.ReadOnlyDataStore
READ_ONLY_ERROR_MSG
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.sensorhub.impl.datastore.EmptyDataStore
get, getDatastoreName, selectEntries
Methods inherited from class org.sensorhub.impl.datastore.ReadOnlyDataStore
backup, clear, commit, isReadOnly, isReadSupported, isWriteSupported, put, remove, restore
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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 org.sensorhub.api.datastore.resource.IResourceStore
filterBuilder, selectAllFilter
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, equals, forEach, get, getOrDefault, hashCode, merge, put, putIfAbsent, remove, remove, replace, replace, replaceAll
-
Constructor Details
-
EmptyResourceStore
public EmptyResourceStore()
-
-
Method Details
-
add
Description copied from interface:IResourceStore
Add a new resource to the store, generating a new key for it- Specified by:
add
in interfaceIResourceStore<K extends Comparable<? super K>,
V extends IResource, VF extends IResourceStore.ResourceField, F extends ResourceFilter<? super V>> - Parameters:
value
- New resource object- Returns:
- The newly allocated key (internal ID)
- Throws:
DataStoreException
- if the resource already exists
-