Queue and Set

Apache Ignite supports the following two distributed data structures for storing objects—Queue and Set. Queue and Set can be deployed in two modes:

  • Collocated: All elements of the queue and set reside on the same cluster node, which is useful for small collections.
  • Non-collocated: Useful for large collections. Elements of queue and set are equally distributed across the cluster. By default, all collections are non-collocated.

The CollectionConfiguration class provides the APIs to configure the collections (Set and Queue).

We can define a distributed Set as follows:

IgniteSet<T> set = ignite.set( "$name", // Set name.  new CollectionConfiguration() // Collection configuration.);

The queue can be defined as follows:

IgniteQueue<T> ...

Get Apache Ignite Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.