public enum MongoDBFactory extends java.lang.Enum<MongoDBFactory>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConnect() |
static com.mongodb.client.MongoCollection<org.bson.Document> |
getCollection(java.lang.String instanceName,
java.lang.String name) |
static com.mongodb.client.MongoDatabase |
getDatabase(java.lang.String instanceName)
get the database or throw a RaptureException -- never returns null
|
static com.mongodb.DB |
getDB(java.lang.String instanceName)
Deprecated.
Use getMongoDatabase
This is still needed because GridFS constructor requires a DB not a MongoDatabase.
Once GridFS is updated (Mongo 3.1) this can be eliminated.
|
static int |
getRetryCount() |
static void |
setRetryCount(int retryCount) |
static MongoDBFactory |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MongoDBFactory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MongoDBFactory INSTANCE
public static MongoDBFactory[] values()
for (MongoDBFactory c : MongoDBFactory.values()) System.out.println(c);
public static MongoDBFactory valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static int getRetryCount()
public static void setRetryCount(int retryCount)
public boolean canConnect()
@Deprecated public static com.mongodb.DB getDB(java.lang.String instanceName)
public static com.mongodb.client.MongoCollection<org.bson.Document> getCollection(java.lang.String instanceName,
java.lang.String name)
public static com.mongodb.client.MongoDatabase getDatabase(java.lang.String instanceName)