Hazelcast C++ Client
|
Public Member Functions | |
const std::string & | get_name () const |
Returns the name of this client instance. More... | |
template<typename T > | |
boost::shared_future< std::shared_ptr< T > > | get_distributed_object (const std::string &name) |
boost::shared_future< std::shared_ptr< imap > > | get_map (const std::string &name) |
Returns the distributed map instance with the specified name. More... | |
boost::shared_future< std::shared_ptr< multi_map > > | get_multi_map (const std::string &name) |
Returns the distributed multimap instance with the specified name. More... | |
boost::shared_future< std::shared_ptr< replicated_map > > | get_replicated_map (const std::string &name) |
boost::shared_future< std::shared_ptr< iqueue > > | get_queue (const std::string &name) |
Returns the distributed queue instance with the specified name. More... | |
boost::shared_future< std::shared_ptr< iset > > | get_set (const std::string &name) |
Returns the distributed set instance with the specified name. More... | |
boost::shared_future< std::shared_ptr< ilist > > | get_list (const std::string &name) |
Returns the distributed list instance with the specified name. More... | |
boost::shared_future< std::shared_ptr< itopic > > | get_topic (const std::string &name) |
Returns the distributed topic instance with the specified name. More... | |
boost::shared_future< std::shared_ptr< reliable_topic > > | get_reliable_topic (const std::string &name) |
Returns the distributed topic instance with the specified name. More... | |
boost::shared_future< std::shared_ptr< flake_id_generator > > | get_flake_id_generator (const std::string &name) |
Returns a generator that creates a cluster-wide unique IDs. More... | |
boost::shared_future< std::shared_ptr< pn_counter > > | get_pn_counter (const std::string &name) |
Obtain a pn_counter with the given name. More... | |
boost::shared_future< std::shared_ptr< ringbuffer > > | get_ringbuffer (const std::string &name) |
Returns the distributed ringbuffer instance with the specified name. More... | |
boost::shared_future< std::shared_ptr< iexecutor_service > > | get_executor_service (const std::string &name) |
Creates or returns the distributed executor service for the given name. More... | |
client_config & | get_client_config () |
transaction_context | new_transaction_context () |
Creates a new transaction_context associated with the current thread using default options. More... | |
transaction_context | new_transaction_context (const transaction_options &options) |
Creates a new transaction_context associated with the current thread with given options. More... | |
cluster & | get_cluster () |
Returns the Cluster that connected Hazelcast instance is a part of. More... | |
local_endpoint | get_local_endpoint () const |
Returns the local endpoint which this HazelcastInstance belongs to. More... | |
boost::uuids::uuid | add_lifecycle_listener (lifecycle_listener &&lifecycle_listener) |
Add listener to listen lifecycle events. More... | |
bool | remove_lifecycle_listener (const boost::uuids::uuid ®istration_id) |
Remove lifecycle listener. More... | |
boost::future< void > | shutdown () |
Shuts down this hazelcast_client. | |
spi::lifecycle_service & | get_lifecycle_service () |
Returns the lifecycle service for this instance. More... | |
cp::cp_subsystem & | get_cp_subsystem () |
Friends | |
class | spi::ClientContext |
boost::future< hazelcast_client > | hazelcast::new_client () |
boost::future< hazelcast_client > | hazelcast::new_client (hazelcast::client::client_config config) |
boost::uuids::uuid hazelcast::client::hazelcast_client::add_lifecycle_listener | ( | lifecycle_listener && | lifecycle_listener | ) |
Add listener to listen lifecycle events.
Warning 1: If listener should do a time consuming operation, off-load the operation to another thread. otherwise it will slow down the system.
Warning 2: Do not make a call to hazelcast. It can cause deadlock.
lifecycleListener | Listener object |
client_config & hazelcast::client::hazelcast_client::get_client_config | ( | ) |
cluster & hazelcast::client::hazelcast_client::get_cluster | ( | ) |
Returns the Cluster that connected Hazelcast instance is a part of.
Cluster interface allows you to add listener for membership events and learn more about the cluster.
cp::cp_subsystem & hazelcast::client::hazelcast_client::get_cp_subsystem | ( | ) |
|
inline |
T | type of the distributed object |
name | name of the distributed object. |
|
inline |
Creates or returns the distributed executor service for the given name.
Executor service enables you to run your Runnable
s and Callable
s on the Hazelcast cluster.
Note: Note that it doesn't support
and doesn't have standard shutdown behavior
name | name of the executor service |
|
inline |
Returns a generator that creates a cluster-wide unique IDs.
Generated IDs are
primitive values and are k-ordered (roughly ordered). IDs are in the range from
to
.
The IDs contain timestamp component and a node ID component, which is assigned when the member joins the cluster. This allows the IDs to be ordered and unique without any coordination between members, which makes the generator safe even in split-brain scenario (for caveats, see here).
For more details and caveats, see class documentation for flake_id_generator.
name | name of the flake_id_generator |
spi::lifecycle_service & hazelcast::client::hazelcast_client::get_lifecycle_service | ( | ) |
Returns the lifecycle service for this instance.
LifecycleService allows you to shutdown this HazelcastInstance and listen for the lifecycle events.
|
inline |
Returns the distributed list instance with the specified name.
List is ordered set of entries. similar to std::vector
name | name of the distributed list |
local_endpoint hazelcast::client::hazelcast_client::get_local_endpoint | ( | ) | const |
Returns the local endpoint which this HazelcastInstance belongs to.
|
inline |
Returns the distributed map instance with the specified name.
K | key type |
V | value type |
name | name of the distributed map |
|
inline |
Returns the distributed multimap instance with the specified name.
name | name of the distributed multimap |
const std::string & hazelcast::client::hazelcast_client::get_name | ( | ) | const |
Returns the name of this client instance.
|
inline |
Obtain a pn_counter with the given name.
The PN counter can be used as a counter with strong eventual consistency guarantees - if operations to the counters stop, the counter values of all replicas that can communicate with each other should eventually converge to the same value.
name | the name of the PN counter |
|
inline |
Returns the distributed queue instance with the specified name.
name | name of the distributed queue |
|
inline |
Returns the distributed topic instance with the specified name.
name | name of the distributed topic |
|
inline |
Returns the distributed ringbuffer instance with the specified name.
name | name of the distributed ringbuffer |
|
inline |
Returns the distributed set instance with the specified name.
Set is ordered unique set of entries. similar to std::unordered_set
name | name of the distributed set |
|
inline |
Returns the distributed topic instance with the specified name.
name | name of the distributed topic |
transaction_context hazelcast::client::hazelcast_client::new_transaction_context | ( | ) |
Creates a new transaction_context associated with the current thread using default options.
transaction_context hazelcast::client::hazelcast_client::new_transaction_context | ( | const transaction_options & | options | ) |
Creates a new transaction_context associated with the current thread with given options.
options | options for this transaction |
bool hazelcast::client::hazelcast_client::remove_lifecycle_listener | ( | const boost::uuids::uuid & | registration_id | ) |
Remove lifecycle listener.
lifecycleListener |