Class WrapperDatabase
- java.lang.Object
-
- de.dytanic.cloudnet.wrapper.database.defaults.WrapperDatabase
-
-
Constructor Summary
Constructors Constructor Description WrapperDatabase(java.lang.String name, DefaultWrapperDatabaseProvider databaseProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void>clearAsync()voidclose()booleancontains(java.lang.String key)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>containsAsync(java.lang.String key)booleandelete(java.lang.String key)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>deleteAsync(java.lang.String key)java.util.Collection<de.dytanic.cloudnet.common.document.gson.JsonDocument>documents()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Collection<de.dytanic.cloudnet.common.document.gson.JsonDocument>>documentsAsync()java.util.Map<java.lang.String,de.dytanic.cloudnet.common.document.gson.JsonDocument>entries()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Map<java.lang.String,de.dytanic.cloudnet.common.document.gson.JsonDocument>>entriesAsync()java.util.List<de.dytanic.cloudnet.common.document.gson.JsonDocument>get(de.dytanic.cloudnet.common.document.gson.JsonDocument filters)de.dytanic.cloudnet.common.document.gson.JsonDocumentget(java.lang.String key)java.util.List<de.dytanic.cloudnet.common.document.gson.JsonDocument>get(java.lang.String fieldName, java.lang.Object fieldValue)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.List<de.dytanic.cloudnet.common.document.gson.JsonDocument>>getAsync(de.dytanic.cloudnet.common.document.gson.JsonDocument filters)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<de.dytanic.cloudnet.common.document.gson.JsonDocument>getAsync(java.lang.String key)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.List<de.dytanic.cloudnet.common.document.gson.JsonDocument>>getAsync(java.lang.String fieldName, java.lang.Object fieldValue)longgetDocumentsCount()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Long>getDocumentsCountAsync()java.lang.StringgetName()booleaninsert(java.lang.String key, de.dytanic.cloudnet.common.document.gson.JsonDocument document)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>insertAsync(java.lang.String key, de.dytanic.cloudnet.common.document.gson.JsonDocument document)voiditerate(java.util.function.BiConsumer<java.lang.String,de.dytanic.cloudnet.common.document.gson.JsonDocument> consumer)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void>iterateAsync(java.util.function.BiConsumer<java.lang.String,de.dytanic.cloudnet.common.document.gson.JsonDocument> consumer)java.util.Collection<java.lang.String>keys()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Collection<java.lang.String>>keysAsync()booleanupdate(java.lang.String key, de.dytanic.cloudnet.common.document.gson.JsonDocument document)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>updateAsync(java.lang.String key, de.dytanic.cloudnet.common.document.gson.JsonDocument document)
-
-
-
Constructor Detail
-
WrapperDatabase
public WrapperDatabase(java.lang.String name, DefaultWrapperDatabaseProvider databaseProvider)
-
-
Method Detail
-
insert
public boolean insert(java.lang.String key, de.dytanic.cloudnet.common.document.gson.JsonDocument document)
-
update
public boolean update(java.lang.String key, de.dytanic.cloudnet.common.document.gson.JsonDocument document)
-
contains
public boolean contains(java.lang.String key)
-
get
public de.dytanic.cloudnet.common.document.gson.JsonDocument get(java.lang.String key)
-
get
public java.util.List<de.dytanic.cloudnet.common.document.gson.JsonDocument> get(java.lang.String fieldName, java.lang.Object fieldValue)
-
get
public java.util.List<de.dytanic.cloudnet.common.document.gson.JsonDocument> get(de.dytanic.cloudnet.common.document.gson.JsonDocument filters)
-
documents
public java.util.Collection<de.dytanic.cloudnet.common.document.gson.JsonDocument> documents()
-
entries
public java.util.Map<java.lang.String,de.dytanic.cloudnet.common.document.gson.JsonDocument> entries()
-
iterate
public void iterate(java.util.function.BiConsumer<java.lang.String,de.dytanic.cloudnet.common.document.gson.JsonDocument> consumer)
-
getDocumentsCount
public long getDocumentsCount()
- Specified by:
getDocumentsCountin interfaceIDatabase
-
insertAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> insertAsync(java.lang.String key, de.dytanic.cloudnet.common.document.gson.JsonDocument document)- Specified by:
insertAsyncin interfaceIDatabase
-
containsAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> containsAsync(java.lang.String key)
- Specified by:
containsAsyncin interfaceIDatabase
-
updateAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> updateAsync(java.lang.String key, de.dytanic.cloudnet.common.document.gson.JsonDocument document)- Specified by:
updateAsyncin interfaceIDatabase
-
deleteAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deleteAsync(java.lang.String key)
- Specified by:
deleteAsyncin interfaceIDatabase
-
getAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<de.dytanic.cloudnet.common.document.gson.JsonDocument> getAsync(java.lang.String key)
-
getAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.List<de.dytanic.cloudnet.common.document.gson.JsonDocument>> getAsync(java.lang.String fieldName, java.lang.Object fieldValue)
-
getAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.List<de.dytanic.cloudnet.common.document.gson.JsonDocument>> getAsync(de.dytanic.cloudnet.common.document.gson.JsonDocument filters)
-
keysAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Collection<java.lang.String>> keysAsync()
-
documentsAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Collection<de.dytanic.cloudnet.common.document.gson.JsonDocument>> documentsAsync()
- Specified by:
documentsAsyncin interfaceIDatabase
-
entriesAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Map<java.lang.String,de.dytanic.cloudnet.common.document.gson.JsonDocument>> entriesAsync()
- Specified by:
entriesAsyncin interfaceIDatabase
-
iterateAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void> iterateAsync(java.util.function.BiConsumer<java.lang.String,de.dytanic.cloudnet.common.document.gson.JsonDocument> consumer)
- Specified by:
iterateAsyncin interfaceIDatabase
-
clearAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void> clearAsync()
- Specified by:
clearAsyncin interfaceIDatabase
-
getDocumentsCountAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Long> getDocumentsCountAsync()
- Specified by:
getDocumentsCountAsyncin interfaceIDatabase
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfacede.dytanic.cloudnet.common.INameable
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-