21#include "hazelcast/util/export.h"
23#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
25#pragma warning(disable : 4251)
36class HAZELCAST_API client_flake_id_generator_config
61 explicit client_flake_id_generator_config(
const std::string& name);
75 client_flake_id_generator_config&
set_name(
const std::string& n);
114 std::chrono::milliseconds duration);
118 int32_t prefetch_count_;
119 std::chrono::milliseconds prefetch_validity_duration_;
125#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
static constexpr int64_t DEFAULT_PREFETCH_VALIDITY_MILLIS
Default value for getPrefetchValidityMillis().
static constexpr int32_t DEFAULT_PREFETCH_COUNT
Default value for getPrefetchCount().
client_flake_id_generator_config & set_prefetch_count(int32_t count)
Sets how many IDs are pre-fetched on the background when one call to FlakeIdGenerator#newId() is made...
static constexpr int32_t MAXIMUM_PREFETCH_COUNT
Maximum value for prefetch count.
std::chrono::milliseconds get_prefetch_validity_duration() const
int32_t get_prefetch_count() const
const std::string & get_name() const
Returns the configuration name.
client_flake_id_generator_config & set_name(const std::string &n)
Sets the name or name pattern for this config.
client_flake_id_generator_config & set_prefetch_validity_duration(std::chrono::milliseconds duration)
Sets for how long the pre-fetched IDs can be used.