API Docs for: 2.2.2
Show:

ListBuckets.Builder Class

A builder for constructing ListBuckets instances.

Rather than having to manually construct the options and instantiating a ListBuckets directly, this builder may be used.

var listBuckets = new ListBuckets.Builder()
                   .withBucketType('myBucketType')
                   .withCallback(myCallback)
                   .build();

Constructor

ListBuckets.Builder

()

Methods

build

() ListBuckets

Construct a ListBuckets instance.

Returns:

withBucketType

(
  • bucketType
)
chainable

Set the bucket type. If not supplied, 'default' is used.

Parameters:

  • bucketType String

    the bucket type in riak

withCallback

(
  • callback
)
chainable

Set the callback to be executed when the operation completes.

Parameters:

  • callback Function

    The callback to be executed when the operation completes.

    • err String

      An error message. Will be null if no error.

    • response Object

      The response from Riak.

      • buckets String
        The buckets returned from Riak.
      • done Boolean
        True if you have received all the buckets.

withStreaming

(
  • [stream=true]
)
chainable

Stream the results. Setting this to true will cause you callback to be called as the results are returned from Riak. Set to false the result set will be buffered and delevered via a single call to your callback. Note that on large result sets this is very memory intensive.

Parameters:

  • [stream=true] Boolean optional

    Set whether or not to stream the results

withTimeout

(
  • timeout
)
chainable

Set a timeout for this operation.

Parameters:

  • timeout Number

    a timeout in milliseconds.