![]() |
Hazelcast C++ Client
Hazelcast C++ Client Library
|
Public Member Functions | |
const std::string & | get_name () const |
Returns the name of this client instance. | |
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. | |
boost::shared_future< std::shared_ptr< multi_map > > | get_multi_map (const std::string &name) |
Returns the distributed multimap instance with the specified name. | |
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. | |
boost::shared_future< std::shared_ptr< iset > > | get_set (const std::string &name) |
Returns the distributed set instance with the specified name. | |
boost::shared_future< std::shared_ptr< ilist > > | get_list (const std::string &name) |
Returns the distributed list instance with the specified name. | |
boost::shared_future< std::shared_ptr< itopic > > | get_topic (const std::string &name) |
Returns the distributed topic instance with the specified name. | |
boost::shared_future< std::shared_ptr< reliable_topic > > | get_reliable_topic (const std::string &name) |
Returns the distributed topic instance with the specified name. | |
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. | |
boost::shared_future< std::shared_ptr< pn_counter > > | get_pn_counter (const std::string &name) |
Obtain a pn_counter with the given name. | |
boost::shared_future< std::shared_ptr< ringbuffer > > | get_ringbuffer (const std::string &name) |
Returns the distributed ringbuffer instance with the specified name. | |
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. | |
client_config & | get_client_config () |
transaction_context | new_transaction_context () |
Creates a new transaction_context associated with the current thread using default options. | |
transaction_context | new_transaction_context (const transaction_options &options) |
Creates a new transaction_context associated with the current thread with given options. | |
cluster & | get_cluster () |
Returns the Cluster that connected Hazelcast instance is a part of. | |
local_endpoint | get_local_endpoint () const |
Returns the local endpoint which this HazelcastInstance belongs to. | |
boost::uuids::uuid | add_lifecycle_listener (lifecycle_listener &&lifecycle_listener) |
Add listener to listen lifecycle events. | |
bool | remove_lifecycle_listener (const boost::uuids::uuid ®istration_id) |
Remove lifecycle listener. | |
boost::future< void > | shutdown () |
Shuts down this hazelcast_client. | |
spi::lifecycle_service & | get_lifecycle_service () |
Returns the lifecycle service for this instance. | |
cp::cp_subsystem & | get_cp_subsystem () |
sql::sql_service & | get_sql () |
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 77 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 107 of file client_impl.cpp.
client_config & hazelcast::client::hazelcast_client::get_client_config | ( | ) |
Definition at line 83 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 101 of file client_impl.cpp.
cp::cp_subsystem & hazelcast::client::hazelcast_client::get_cp_subsystem | ( | ) |
Definition at line 141 of file client_impl.cpp.
|
inline |
T | type of the distributed object |
name | name of the distributed object. |
Definition at line 103 of file hazelcast_client.h.
|
inline |
Creates or returns the distributed executor service for the given name.
Executor service enables you to run your Runnables and Callables on the Hazelcast cluster.
Note: Note that it doesn't support invokeAll/Any
and doesn't have standard shutdown behavior
name | name of the executor service |
Definition at line 265 of file hazelcast_client.h.
|
inline |
Returns a generator that creates a cluster-wide unique IDs.
Generated IDs are long
primitive values and are k-ordered (roughly ordered). IDs are in the range from 0
to Long.MAX_VALUE
.
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 219 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 127 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 172 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 133 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 118 of file hazelcast_client.h.
|
inline |
Returns the distributed multimap instance with the specified name.
name | name of the distributed multimap |
Definition at line 129 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 77 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 |
pn_counter
Definition at line 236 of file hazelcast_client.h.
|
inline |
Returns the distributed queue instance with the specified name.
name | name of the distributed queue |
Definition at line 147 of file hazelcast_client.h.
|
inline |
Returns the distributed topic instance with the specified name.
name | name of the distributed topic |
Definition at line 196 of file hazelcast_client.h.
|
inline |
Definition at line 135 of file hazelcast_client.h.
|
inline |
Returns the distributed ringbuffer instance with the specified name.
name | name of the distributed ringbuffer |
Definition at line 248 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 160 of file hazelcast_client.h.
sql::sql_service & hazelcast::client::hazelcast_client::get_sql | ( | ) |
Definition at line 147 of file client_impl.cpp.
|
inline |
Returns the distributed topic instance with the specified name.
name | name of the distributed topic |
Definition at line 184 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 89 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 95 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 114 of file client_impl.cpp.
boost::future< void > hazelcast::client::hazelcast_client::shutdown | ( | ) |
Shuts down this hazelcast_client.
Definition at line 121 of file client_impl.cpp.
|
friend |
Definition at line 79 of file hazelcast_client.h.