SDK
SDK Java v3.x
2

This SDK is deprecated. We recommend to use the Kuzzle SDK-JVM.
A migration guide is available here

list #

Returns the list of collections associated to a provided index. The returned list is sorted in alphanumerical order.


public CompletableFuture<ConcurrentHashMap<String, Object>> list(
      final String index) throws NotConnectedException, InternalException
ArgumentsTypeDescription
index
String
Index name

Returns #

Returns a ConcurrentHashMap<String, Object> containing the following properties:

PropertyTypeDescription
type
String
Types of returned collections
(all, realtime or stored)
collectionsArrayList<Object>List of collections
from
Integer
Offset of the first result
size
Integer
Maximum number of returned results

Each object in the collections array contains the following properties:

PropertyTypeDescription
name
String
Collection name
type
String
Collection type (realtime or stored)

Usage #

ConcurrentHashMap<String, Object> result = kuzzle
  .getCollectionController()
  .list("nyc-open-data")
  .get();
/*
  {
    size=10,
    collections=[
      {
        name=dark-taxi,
        type=stored
      },
      {
        name=pink-taxi,
        type=stored
      }
     ],
    from=0,
    type=all
   }
 */