@Immutable public final class CollectionId extends Object implements DataCollectionId
| Modifier and Type | Field and Description |
|---|---|
private String |
dbName |
private String |
name |
private String |
replicaSetName |
| Constructor and Description |
|---|
CollectionId(String replicaSetName,
String dbName,
String collectionName)
Create a new collection identifier.
|
| Modifier and Type | Method and Description |
|---|---|
String |
dbName()
Get the name of the database in which the collection exists.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
identifier() |
String |
name()
Get the name of the collection.
|
String |
namespace()
Get the namespace of this collection, which is comprised of the
database name and collection
name. |
static CollectionId |
parse(String replicaSetName,
String str)
Parse the supplied
<database_name>.<collection_name> string. |
String |
replicaSetName()
Get the name of the replica set in which the collection (and database) exist.
|
String |
toString() |
private final String replicaSetName
private final String dbName
private final String name
public CollectionId(String replicaSetName, String dbName, String collectionName)
replicaSetName - the name of the replica set; may not be nulldbName - the name of the database; may not be nullcollectionName - the name of the collection; may not be nullpublic static CollectionId parse(String replicaSetName, String str)
<database_name>.<collection_name> string.
The collection_name can also contain dots in its value.replicaSetName - the name of replica; may not be nullstr - the string representation of the collection identifier; may not be nullpublic String name()
public String dbName()
public String replicaSetName()
public String identifier()
identifier in interface DataCollectionIdpublic String namespace()
database name and collection
name.Copyright © 2020 JBoss by Red Hat. All rights reserved.