Package com.couchbase.client.core.io
Class CollectionMap
java.lang.Object
com.couchbase.client.core.io.CollectionMap
The
CollectionMap
maps a locator to the encoded collection ID representation.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
get
(CollectionIdentifier key) Retrieves the collection id for the given identifier.boolean
hasBucketMap
(String bucket) Checks if the given bucket is at all present in the map.Map<CollectionIdentifier,
byte[]> inner()
Returns the inner map, mainly for print/debug purposes.void
put
(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.
-
inner
Returns the inner map, mainly for print/debug purposes.- Returns:
- the inner map, immutable.
-