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 Details

    • CollectionMap

      public CollectionMap()
  • Method Details

    • 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.