Package com.couchbase.client.core.io
Class CollectionMap
java.lang.Object
com.couchbase.client.core.io.CollectionMap
public class CollectionMap extends Object
The
CollectionMap maps a locator to the encoded collection ID representation.-
Constructor Summary
Constructors Constructor Description CollectionMap() -
Method Summary
Modifier and Type Method Description byte[]get(CollectionIdentifier key)Retrieves the collection id for the given identifier.booleanhasBucketMap(String bucket)Checks if the given bucket is at all present in the map.voidput(CollectionIdentifier key, byte[] value)Stores a new collection ID with the given identifier.
-
Constructor Details
-
CollectionMap
public CollectionMap()
-
-
Method Details
-
get
Retrieves the collection id for the given identifier. Might return null if not found! Also it will return the default id for the default scope/collection.- Parameters:
key- the key to check- Returns:
- the collection id.
-
put
Stores a new collection ID with the given identifier.- Parameters:
key- the key to store.value- the value associated.
-
hasBucketMap
Checks if the given bucket is at all present in the map.- Parameters:
bucket- the bucket name to check- Returns:
- true if so, false otherwise.
-