Hazelcast C++ Client
Hazelcast C++ Client Library
hazelcast::client::config::index_config Struct Reference

Configuration of an index. More...

#include <index_config.h>

Classes

struct  bitmap_index_options
 

Public Types

enum  index_type { SORTED , HASH , BITMAP }
 

Public Member Functions

 index_config (index_type type)
 Creates an index configuration of the given type. More...
 
template<typename ... T>
 index_config (index_type t, T... attrs)
 Creates an index configuration of the given type with provided attributes. More...
 

Public Attributes

boost::optional< std::string > name
 Name of the index.
 
index_type type
 Type of the index.
 
std::vector< std::string > attributes
 Indexed attributes.
 
boost::optional< bitmap_index_optionsoptions
 

Static Public Attributes

static const index_type DEFAULT_TYPE = index_config::index_type::SORTED
 

Detailed Description

Configuration of an index.

Hazelcast support two types of indexes: sorted index and hash index. Sorted indexes could be used with equality and range predicates and have logarithmic search time. Hash indexes could be used with equality predicates and have constant search time assuming the hash function of the indexed field disperses the elements properly.

Index could be created on one or more attributes.

Definition at line 40 of file index_config.h.

Member Enumeration Documentation

◆ index_type

Enumerator
SORTED 

Sorted index.

Can be used with equality and range predicates.

HASH 

Hash index.

Can be used with equality predicates.

BITMAP 

Bitmap index.

Can be used with equality predicates.

Definition at line 85 of file index_config.h.

85  {
87  SORTED,
88 
90  HASH,
91 
93  BITMAP
94  };

Constructor & Destructor Documentation

◆ index_config() [1/2]

hazelcast::client::config::index_config::index_config ( index_config::index_type  type)

Creates an index configuration of the given type.

Parameters
typeIndex type.

Definition at line 595 of file config.cpp.

595 : type(type) {}
index_type type
Type of the index.
Definition: index_config.h:100

◆ index_config() [2/2]

template<typename ... T>
hazelcast::client::config::index_config::index_config ( index_type  t,
T...  attrs 
)
inline

Creates an index configuration of the given type with provided attributes.

Parameters
typeIndex type.
attributesAttributes to be indexed.

Definition at line 125 of file index_config.h.

125  : type(t) {
126  add_attributes(std::forward<T>(attrs)...);
127  }

The documentation for this struct was generated from the following files: