Package com.couchbase.client.core.io
Class CollectionMap
- java.lang.Object
-
- com.couchbase.client.core.io.CollectionMap
-
public class CollectionMap extends Object
TheCollectionMap
maps a locator to the encoded collection ID representation.
-
-
Constructor Summary
Constructors Constructor Description CollectionMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
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.
-
-
-
Method Detail
-
get
public byte[] get(CollectionIdentifier key)
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
public void put(CollectionIdentifier key, byte[] value)
Stores a new collection ID with the given identifier.- Parameters:
key
- the key to store.value
- the value associated.
-
hasBucketMap
public boolean hasBucketMap(String bucket)
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
public Map<CollectionIdentifier,byte[]> inner()
Returns the inner map, mainly for print/debug purposes.- Returns:
- the inner map, immutable.
-
-