![]() |
Hazelcast C++ Client
Hazelcast C++ Client Library
|
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) |
Definition at line 62 of file hazelcast_client.h.
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 |
Definition at line 100 of file client_impl.cpp.
client_config & hazelcast::client::hazelcast_client::get_client_config | ( | ) |
Definition at line 84 of file client_impl.cpp.
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.
Definition at line 96 of file client_impl.cpp.
cp::cp_subsystem & hazelcast::client::hazelcast_client::get_cp_subsystem | ( | ) |
Definition at line 122 of file client_impl.cpp.
|
inline |
T | type of the distributed object |
name | name of the distributed object. |
Definition at line 86 of file hazelcast_client.h.
|
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 |
Definition at line 226 of file hazelcast_client.h.
|
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 |
Definition at line 185 of file hazelcast_client.h.
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.
Definition at line 112 of file client_impl.cpp.
|
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 |
Definition at line 145 of file hazelcast_client.h.
local_endpoint hazelcast::client::hazelcast_client::get_local_endpoint | ( | ) | const |
Returns the local endpoint which this HazelcastInstance belongs to.
Definition at line 116 of file client_impl.cpp.
|
inline |
Returns the distributed map instance with the specified name.
K | key type |
V | value type |
name | name of the distributed map |
Definition at line 99 of file hazelcast_client.h.
|
inline |
Returns the distributed multimap instance with the specified name.
name | name of the distributed multimap |
Definition at line 109 of file hazelcast_client.h.
const std::string & hazelcast::client::hazelcast_client::get_name | ( | ) | const |
Returns the name of this client instance.
Definition at line 80 of file client_impl.cpp.
|
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 |
Definition at line 201 of file hazelcast_client.h.
|
inline |
Returns the distributed queue instance with the specified name.
name | name of the distributed queue |
Definition at line 123 of file hazelcast_client.h.
|
inline |
Returns the distributed topic instance with the specified name.
name | name of the distributed topic |
Definition at line 165 of file hazelcast_client.h.
|
inline |
Returns the distributed ringbuffer instance with the specified name.
name | name of the distributed ringbuffer |
Definition at line 211 of file hazelcast_client.h.
|
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 |
Definition at line 134 of file hazelcast_client.h.
|
inline |
Returns the distributed topic instance with the specified name.
name | name of the distributed topic |
Definition at line 155 of file hazelcast_client.h.
transaction_context hazelcast::client::hazelcast_client::new_transaction_context | ( | ) |
Creates a new transaction_context associated with the current thread using default options.
Definition at line 88 of file client_impl.cpp.
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 |
Definition at line 92 of file client_impl.cpp.
bool hazelcast::client::hazelcast_client::remove_lifecycle_listener | ( | const boost::uuids::uuid & | registration_id | ) |
Remove lifecycle listener.
lifecycleListener |
Definition at line 104 of file client_impl.cpp.