public class HelperMongoPlugin extends ExtendedJavaPlugin implements MongoProvider
| Constructor and Description |
|---|
HelperMongoPlugin() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
enable() |
MongoDatabaseCredentials |
getGlobalCredentials()
Gets the global database credentials being used for the global datasource.
|
Mongo |
getMongo()
Gets the global datasource.
|
Mongo |
getMongo(MongoDatabaseCredentials credentials)
Constructs a new datasource using the given credentials.
|
bind, bindModule, disable, getBundledFile, getClassloader, getPlugin, getService, isPluginEnabled, load, loadConfig, loadConfigNode, onDisable, onEnable, onLoad, provideService, provideService, registerCommand, registerListener, setupConfiggetClassLoader, getCommand, getConfig, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitprotected void enable()
enable in class ExtendedJavaPlugin@Nonnull public Mongo getMongo()
MongoProvidergetMongo in interface MongoProvider@Nonnull public Mongo getMongo(@Nonnull MongoDatabaseCredentials credentials)
MongoProviderThese instances are not cached, and a new datasource is created each time this method is called.
getMongo in interface MongoProvidercredentials - the credentials for the database@Nonnull public MongoDatabaseCredentials getGlobalCredentials()
MongoProvidergetGlobalCredentials in interface MongoProviderCopyright © 2018. All rights reserved.