Class DefaultDocumentStore
java.lang.Object
io.fluxcapacitor.javaclient.persisting.search.DefaultDocumentStore
- All Implemented Interfaces:
DocumentStore
,HasLocalHandlers
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbulkUpdate
(Collection<? extends BulkUpdate> updates, Guarantee guarantee) Applies a batch of document updates, using givenGuarantee
.createAuditTrail
(Object collection, Duration retentionTime) Configures Flux to use a search collection as a searchable audit trail with the given retention time.deleteCollection
(Object collection) Deletes an entire collection of documents.deleteDocument
(Object id, Object collection) Deletes a document from the collection.<T> Optional
<T> fetchDocument
(Object id, Object collection) Fetches a document by ID and deserializes it into the stored type.<T> Optional
<T> fetchDocument
(Object id, Object collection, Class<T> type) Fetches a document by ID and deserializes it into the provided type.boolean
hasDocument
(Object id, Object collection) Checks if a document exists in the specified collection.index
(@NonNull Object object, Object id, Object collection, Instant begin, Instant end, Metadata metadata, Guarantee guarantee, boolean ifNotExists) Indexes a document with the specified guarantees, metadata, and if-not-exists condition.index
(Collection<?> objects, Object collection, String idPath, String beginPath, String endPath, Guarantee guarantee, boolean ifNotExists) Indexes a collection of objects using functional accessors for ID and time intervals.<T> CompletableFuture
<Void> index
(Collection<? extends T> objects, Object collection, Function<? super T, ?> idFunction, Function<? super T, Instant> beginFunction, Function<? super T, Instant> endFunction, Guarantee guarantee, boolean ifNotExists) Indexes a collection of objects using functional accessors for ID and time intervals.search
(SearchQuery.Builder searchBuilder) Prepares a search query based on the specifiedSearchQuery.Builder
.serializeAction
(BulkUpdate update) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.fluxcapacitor.javaclient.persisting.search.DocumentStore
bulkUpdate, determineCollection, getSerializer, index, index, index, index, index, index, index, index, index, index, index, index, indexIfNotExists, indexIfNotExists, indexIfNotExists, indexIfNotExists, indexIfNotExists, indexIfNotExists, indexIfNotExists, indexIfNotExists, indexIfNotExists, indexIfNotExists, prepareIndex, search
Methods inherited from interface io.fluxcapacitor.javaclient.tracking.handling.HasLocalHandlers
hasLocalHandlers, registerHandler, registerHandler, setSelfHandlerFilter
-
Constructor Details
-
DefaultDocumentStore
public DefaultDocumentStore()
-
-
Method Details
-
index
public CompletableFuture<Void> index(@NonNull @NonNull Object object, Object id, Object collection, Instant begin, Instant end, Metadata metadata, Guarantee guarantee, boolean ifNotExists) Description copied from interface:DocumentStore
Indexes a document with the specified guarantees, metadata, and if-not-exists condition.- Specified by:
index
in interfaceDocumentStore
-
index
public CompletableFuture<Void> index(Collection<?> objects, Object collection, String idPath, String beginPath, String endPath, Guarantee guarantee, boolean ifNotExists) Description copied from interface:DocumentStore
Indexes a collection of objects using functional accessors for ID and time intervals.- Specified by:
index
in interfaceDocumentStore
-
index
public <T> CompletableFuture<Void> index(Collection<? extends T> objects, Object collection, Function<? super T, ?> idFunction, Function<? super T, Instant> beginFunction, Function<? super T, Instant> endFunction, Guarantee guarantee, boolean ifNotExists) Description copied from interface:DocumentStore
Indexes a collection of objects using functional accessors for ID and time intervals.- Specified by:
index
in interfaceDocumentStore
-
bulkUpdate
public CompletableFuture<Void> bulkUpdate(Collection<? extends BulkUpdate> updates, Guarantee guarantee) Description copied from interface:DocumentStore
Applies a batch of document updates, using givenGuarantee
.- Specified by:
bulkUpdate
in interfaceDocumentStore
-
serializeAction
-
search
Description copied from interface:DocumentStore
Prepares a search query based on the specifiedSearchQuery.Builder
.- Specified by:
search
in interfaceDocumentStore
-
hasDocument
Description copied from interface:DocumentStore
Checks if a document exists in the specified collection.- Specified by:
hasDocument
in interfaceDocumentStore
-
fetchDocument
Description copied from interface:DocumentStore
Fetches a document by ID and deserializes it into the stored type.- Specified by:
fetchDocument
in interfaceDocumentStore
-
fetchDocument
Description copied from interface:DocumentStore
Fetches a document by ID and deserializes it into the provided type.- Specified by:
fetchDocument
in interfaceDocumentStore
-
deleteDocument
Description copied from interface:DocumentStore
Deletes a document from the collection.- Specified by:
deleteDocument
in interfaceDocumentStore
-
deleteCollection
Description copied from interface:DocumentStore
Deletes an entire collection of documents.- Specified by:
deleteCollection
in interfaceDocumentStore
-
createAuditTrail
Description copied from interface:DocumentStore
Configures Flux to use a search collection as a searchable audit trail with the given retention time.- Specified by:
createAuditTrail
in interfaceDocumentStore
-