Hazelcast C++ Client
Hazelcast C++ Client Library
Loading...
Searching...
No Matches
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=DEFAULT_TYPE)
 Creates an index configuration of the given type.
template<typename... T>
 index_config (index_type t, T... attrs)
 Creates an index configuration of the given type with provided attributes.

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

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 90 of file index_config.h.

Constructor & Destructor Documentation

◆ index_config() [1/2]

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

Creates an index configuration of the given type.

Parameters
typeIndex type.

Definition at line 814 of file config.cpp.

815 : type(type)
816{}
index_type type
Type of the index.

◆ 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 130 of file index_config.h.

131 : index_config(t)
132 {
133 add_attributes(std::forward<T>(attrs)...);
134 }
index_config(index_type type=DEFAULT_TYPE)
Creates an index configuration of the given type.
Definition config.cpp:814

Member Data Documentation

◆ attributes

std::vector<std::string> hazelcast::client::config::index_config::attributes

Indexed attributes.

Definition at line 109 of file index_config.h.

◆ DEFAULT_TYPE

const index_config::index_type hazelcast::client::config::index_config::DEFAULT_TYPE
static
Initial value:

Definition at line 113 of file index_config.h.

◆ name

boost::optional<std::string> hazelcast::client::config::index_config::name

Name of the index.

Definition at line 103 of file index_config.h.

◆ options

boost::optional<bitmap_index_options> hazelcast::client::config::index_config::options

Definition at line 111 of file index_config.h.

◆ type

index_type hazelcast::client::config::index_config::type

Type of the index.

Definition at line 106 of file index_config.h.


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