18 #include <boost/utility/string_view.hpp> 20 #include "hazelcast/client/impl/hazelcast_client_instance_impl.h" 22 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 24 #pragma warning(disable: 4251) //for dll export 29 class hazelcast_client;
35 boost::future<client::hazelcast_client> HAZELCAST_API new_client();
41 boost::future<client::hazelcast_client> HAZELCAST_API new_client(client::client_config config);
63 friend class spi::ClientContext;
66 friend boost::future<hazelcast_client> hazelcast::new_client();
77 const std::string &get_name()
const;
87 return client_impl_->get_distributed_object<T>(name);
99 boost::shared_future<std::shared_ptr<imap>>
get_map(
const std::string &name) {
100 return client_impl_->get_distributed_object<
imap>(name);
109 boost::shared_future<std::shared_ptr<multi_map>>
get_multi_map(
const std::string& name) {
110 return client_impl_->get_distributed_object<
multi_map>(name);
113 boost::shared_future<std::shared_ptr<replicated_map>> get_replicated_map(
const std::string &name) {
114 return client_impl_->get_distributed_object<
replicated_map>(name);
123 boost::shared_future<std::shared_ptr<iqueue>>
get_queue(
const std::string& name) {
124 return client_impl_->get_distributed_object<
iqueue>(name);
134 boost::shared_future<std::shared_ptr<iset>>
get_set(
const std::string& name) {
135 return client_impl_->get_distributed_object<
iset>(name);
145 boost::shared_future<std::shared_ptr<ilist>>
get_list(
const std::string& name) {
146 return client_impl_->get_distributed_object<
ilist>(name);
155 boost::shared_future<std::shared_ptr<itopic>>
get_topic(
const std::string& name) {
156 return client_impl_->get_distributed_object<
itopic>(name);
166 return get_distributed_object<ringbuffer>(std::string(reliable_topic::TOPIC_RB_PREFIX) + name).then(
167 boost::launch::sync, [=](boost::shared_future<std::shared_ptr<ringbuffer>> f) {
169 return std::shared_ptr<reliable_topic>(
new reliable_topic(rb, name, &rb->get_context()));
205 boost::shared_future<std::shared_ptr<pn_counter>>
get_pn_counter(
const std::string& name) {
206 return client_impl_->get_distributed_object<
pn_counter>(name);
215 boost::shared_future<std::shared_ptr<ringbuffer>>
get_ringbuffer(
const std::string& name) {
216 return client_impl_->get_distributed_object<
ringbuffer>(name);
290 bool remove_lifecycle_listener(
const boost::uuids::uuid ®istration_id);
295 boost::future<void> shutdown();
304 spi::lifecycle_service &get_lifecycle_service();
317 std::shared_ptr<impl::hazelcast_client_instance_impl> client_impl_;
323 const boost::string_view HAZELCAST_API version();
328 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) boost::shared_future< std::shared_ptr< T > > get_distributed_object(const std::string &name)
Definition: hazelcast_client.h:86
boost::shared_future< std::shared_ptr< multi_map > > get_multi_map(const std::string &name)
Returns the distributed multimap instance with the specified name.
Definition: hazelcast_client.h:109
boost::shared_future< std::shared_ptr< iset > > get_set(const std::string &name)
Returns the distributed set instance with the specified name.
Definition: hazelcast_client.h:134
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.
Definition: hazelcast_client.h:189
boost::shared_future< std::shared_ptr< reliable_topic > > get_reliable_topic(const std::string &name)
Returns the distributed topic instance with the specified name.
Definition: hazelcast_client.h:165
Definition: hazelcast_client.h:62
boost::shared_future< std::shared_ptr< imap > > get_map(const std::string &name)
Returns the distributed map instance with the specified name.
Definition: hazelcast_client.h:99
The Client interface allows to get information about a connected client's socket address, type and UUID.
Definition: local_endpoint.h:32
Concurrent, blocking, distributed, observable, client queue.
Definition: iqueue.h:29
Hazelcast provides distribution mechanism for publishing messages that are delivered to multiple subs...
Definition: reliable_topic.h:51
Provides a context to do transactional operations; so beginning/committing transactions, but also retrieving transactional data-structures like the TransactionalMap.
Definition: transaction_context.h:60
Concurrent, distributed, observable and queryable map client.
Definition: imap.h:63
boost::shared_future< std::shared_ptr< ilist > > get_list(const std::string &name)
Returns the distributed list instance with the specified name.
Definition: hazelcast_client.h:145
Concurrent, distributed, client implementation of list.
Definition: ilist.h:28
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.
Definition: hazelcast_client.h:230
hazelcast_client configuration class.
Definition: client_config.h:102
boost::shared_future< std::shared_ptr< itopic > > get_topic(const std::string &name)
Returns the distributed topic instance with the specified name.
Definition: hazelcast_client.h:155
boost::shared_future< std::shared_ptr< ringbuffer > > get_ringbuffer(const std::string &name)
Returns the distributed ringbuffer instance with the specified name.
Definition: hazelcast_client.h:215
boost::shared_future< std::shared_ptr< pn_counter > > get_pn_counter(const std::string &name)
Obtain a pn_counter with the given name.
Definition: hazelcast_client.h:205
PN (Positive-Negative) CRDT counter.
Definition: pn_counter.h:76
Distributed implementation of java.util.concurrent.ExecutorService.
Definition: iexecutor_service.h:50
boost::shared_future< std::shared_ptr< iqueue > > get_queue(const std::string &name)
Returns the distributed queue instance with the specified name.
Definition: hazelcast_client.h:123
A specialized distributed map client whose keys can be associated with multiple values.
Definition: multi_map.h:30
A cluster-wide unique ID generator.
Definition: flake_id_generator.h:52
Hazelcast provides distribution mechanism for publishing messages that are delivered to multiple subs...
Definition: itopic.h:39
Listener object for listening lifecycle events of hazelcast instance.
Definition: lifecycle_listener.h:48
CP Subsystem is a component of Hazelcast that builds a strongly consistent layer for a set of distrib...
Definition: cp.h:1300
Definition: replicated_map.h:46
Contains the configuration for a Hazelcast transaction.
Definition: transaction_options.h:31
Hazelcast cluster interface.
Definition: cluster.h:36
Concurrent, distributed client implementation of std::unordered_set.
Definition: iset.h:28
A Ringbuffer is a data-structure where the content is stored in a ring like structure.
Definition: ringbuffer.h:59