Class CouchbaseQueue<E>

    • Constructor Detail

      • CouchbaseQueue

        public CouchbaseQueue​(String id,
                              Bucket bucket)
        Create a new Couchbase-backed Queue, backed by the document identified by id in bucket. Note that if the document already exists, its content will be used as initial content for this collection. Otherwise it is created empty.
        Parameters:
        id - the id of the Couchbase document to back the queue.
        bucket - the Bucket through which to interact with the document.
      • CouchbaseQueue

        public CouchbaseQueue​(String id,
                              Bucket bucket,
                              E... content)
        Create a new Couchbase-backed Queue, backed by the document identified by id in bucket. Note that if the document already exists, its content is reset to the values provided. Note that if you don't provide any value as a vararg, the CouchbaseQueue(String, Bucket) constructor will be invoked instead, which will use pre-existing values as content. To create a new Queue and force it to be empty, use CouchbaseQueue(String, Bucket, Collection) with an empty collection.
        Parameters:
        id - the id of the Couchbase document to back the queue.
        bucket - the Bucket through which to interact with the document.
        content - vararg of the elements to initially store in the Queue.
      • CouchbaseQueue

        public CouchbaseQueue​(String id,
                              Bucket bucket,
                              Collection<? extends E> content)
        Create a new Couchbase-backed Queue, backed by the document identified by id in bucket. Note that if the document already exists, its content is reset to the values provided in the content Collection.
        Parameters:
        id - the id of the Couchbase document to back the queue.
        bucket - the Bucket through which to interact with the document.
        content - collection of the elements to initially store in the Queue, in iteration order.