public class MultiMemoryCountingCriteria extends Object implements Criteria<List<String>,Long>
MultiMemoryCountingCriteria
storage manager. retrieve(StorageManager)
counts the keys in the default namespace
(MultiMemoryStorageManager.getDefaultNamespace()
) while apply(StorageManager, List)
takes a
List
of String of namespaces to retrieve the total count for. If the List
is empty or null, the total
count is returned.Constructor and Description |
---|
MultiMemoryCountingCriteria() |
Modifier and Type | Method and Description |
---|---|
<V extends Serializable> |
apply(StorageManager<V> storage,
List<String> query)
Applies the criteria to the
StorageManager . |
<V extends Serializable> |
get(StorageManager<V> storage)
Retrieves data from the given
StorageManager as a CompletableFuture resolving to a key-value
mapping of the raw data stored in the storage. |
<V extends Serializable> |
retrieve(StorageManager<V> storage)
Retrieves data from the given
StorageManager as a CompletableFuture resolving to the specific
return type of this Criteria . |
public <V extends Serializable> CompletableFuture<Map<String,V>> get(StorageManager<V> storage)
Criteria
StorageManager
as a CompletableFuture
resolving to a key-value
mapping of the raw data stored in the storage.get
in interface Criteria<List<String>,Long>
V
- The type of the data stored in the storage.storage
- The StorageManager
to retrieve data from.CompletableFuture
that resolves to a Map
of String keys to the raw data in the storage.public <V extends Serializable> CompletableFuture<Long> retrieve(StorageManager<V> storage)
Criteria
StorageManager
as a CompletableFuture
resolving to the specific
return type of this Criteria
.retrieve
in interface Criteria<List<String>,Long>
V
- The type of the data stored in the storage.storage
- The StorageManager
to retrieve data from.CompletableFuture
that resolves to the return type of this Criteria
.public <V extends Serializable> CompletableFuture<Long> apply(StorageManager<V> storage, List<String> query)
Criteria
StorageManager
. This is left to the specific criteria to choose what to do.apply
in interface Criteria<List<String>,Long>
V
- The type of the data stored in the storage.storage
- The StorageManager
to apply this to.query
- The specific query to apply to this Criteria
.CompletableFuture
that resolves to the return type of this Criteria
.Copyright © 2021. All rights reserved.