ExHashRing.Configuration (ex_hash_ring v6.0.1) View Source

Configuration provides programmatic access into the various configuration settings that can be configured for ExHashRing.

Link to this section Summary

Functions

Clears any custom configuration for depth, this will cause it to revert to the default, 1

Clears any custom configuration for gc_delay, this will cause it to revert to the default, 10000

Clears any custom configuration for replicas, this will cause it to rever to the default, 512

Get the configured history depth.

Get the configured gc delay. Result is number of milliseconds to delay.

Get the configured number of replicas.

Puts the history depth.

Puts the gc delay, delay is a positive number of milliseconds to wait before gc.

Puts the number of replicas.

Link to this section Functions

Specs

clear_depth() :: :ok

Clears any custom configuration for depth, this will cause it to revert to the default, 1

Specs

clear_gc_delay() :: :ok

Clears any custom configuration for gc_delay, this will cause it to revert to the default, 10000

Specs

clear_replicas() :: :ok

Clears any custom configuration for replicas, this will cause it to rever to the default, 512

Specs

get_depth() :: ExHashRing.Ring.depth()

Get the configured history depth.

Specs

get_gc_delay() :: pos_integer()

Get the configured gc delay. Result is number of milliseconds to delay.

Specs

get_replicas() :: ExHashRing.Node.replicas()

Get the configured number of replicas.

Specs

put_depth(depth :: ExHashRing.Ring.depth()) :: :ok

Puts the history depth.

Specs

put_gc_delay(delay :: pos_integer()) :: :ok

Puts the gc delay, delay is a positive number of milliseconds to wait before gc.

Specs

put_replicas(replicas :: ExHashRing.Node.replicas()) :: :ok

Puts the number of replicas.