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.


Copied to clipboard!
public CompletableFuture<ConcurrentHashMap<String, Object>> list(
      final String index) throws NotConnectedException, InternalException
Arguments Type Description
index
String
Index name

Returns #

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

Property Type Description
type
String
Types of returned collections
(all, realtime or stored)
collections ArrayList<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:

Property Type Description
name
String
Collection name
type
String
Collection type (realtime or stored)

Usage #

Copied to clipboard!
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
   }
 */