Interface CouchbaseBucketManagerFactory

All Superinterfaces:
AutoCloseable, org.eclipse.jnosql.communication.keyvalue.BucketManagerFactory, Function<String,org.eclipse.jnosql.communication.keyvalue.BucketManager>

public interface CouchbaseBucketManagerFactory extends org.eclipse.jnosql.communication.keyvalue.BucketManagerFactory
A Couchbase specialization of BucketManagerFactory.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.jnosql.communication.keyvalue.BucketManager
    getBucketManager(String bucketName, String collection)
    Create a BucketManager using a given collection instead of the default
    <T> List<T>
    getList(String bucketName, String key, Class<T> type)
    Creates a List from bucket name
    <K, V> Map<K,V>
    getMap(String bucketName, String key, Class<K> keyType, Class<V> valueType)
    Creates a Map from bucket name
    <T> Queue<T>
    getQueue(String bucketName, String key, Class<T> type)
    Creates a Queue from bucket name
    <T> Set<T>
    getSet(String bucketName, String key, Class<T> type)
    Creates a Set from bucket name

    Methods inherited from interface org.eclipse.jnosql.communication.keyvalue.BucketManagerFactory

    close, getList, getMap, getQueue, getSet

    Methods inherited from interface java.util.function.Function

    andThen, apply, compose
  • Method Details

    • getBucketManager

      org.eclipse.jnosql.communication.keyvalue.BucketManager getBucketManager(String bucketName, String collection)
      Create a BucketManager using a given collection instead of the default
      Parameters:
      bucketName - the bucket name
      collection - the collection name
      Returns:
      a BucketManager instance
      Throws:
      NullPointerException - when there is null parameter
    • getQueue

      <T> Queue<T> getQueue(String bucketName, String key, Class<T> type)
      Creates a Queue from bucket name
      Type Parameters:
      T - the value type
      Parameters:
      bucketName - a bucket name
      type - the value class
      key - key to the queue
      Returns:
      a Queue instance
      Throws:
      UnsupportedOperationException - when the database does not have to it
      NullPointerException - when either bucketName or class are null
    • getSet

      <T> Set<T> getSet(String bucketName, String key, Class<T> type)
      Creates a Set from bucket name
      Type Parameters:
      T - the value type
      Parameters:
      bucketName - a bucket name
      type - the valeu class
      key - key to the set
      Returns:
      a Set instance
      Throws:
      UnsupportedOperationException - when the database does not have to it
      NullPointerException - when either bucketName or class are null
    • getList

      <T> List<T> getList(String bucketName, String key, Class<T> type)
      Creates a List from bucket name
      Type Parameters:
      T - the value type
      Parameters:
      bucketName - a bucket name
      type - the valeu class
      key - key to the List
      Returns:
      a List instance
      Throws:
      UnsupportedOperationException - when the database does not have to it
      NullPointerException - when either bucketName or class are null
    • getMap

      <K, V> Map<K,V> getMap(String bucketName, String key, Class<K> keyType, Class<V> valueType)
      Creates a Map from bucket name
      Type Parameters:
      K - the key type
      V - the value type
      Parameters:
      bucketName - the bucket name
      key - key to the Map
      keyType - the key class
      valueType - the value class
      Returns:
      a Map instance
      Throws:
      UnsupportedOperationException - when the database does not have to it
      NullPointerException - when either bucketName or class are null