Hazelcast C++ Client
Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
hazelcast::cp::session_semaphore Class Reference
+ Inheritance diagram for hazelcast::cp::session_semaphore:

Public Member Functions

 session_semaphore (const std::string &proxy_name, client::spi::ClientContext *context, const raft_group_id &group_id, const std::string &object_name, internal::session::proxy_session_manager &session_manager)
 
boost::future< void > acquire (int32_t permits) override
 
boost::future< void > release (int32_t permits) override
 
boost::future< int32_t > drain_permits () override
 

Protected Member Functions

boost::future< bool > try_acquire_for_millis (int32_t permits, std::chrono::milliseconds timeout) override
 
void throw_illegal_state_exception (std::exception_ptr e)
 
int64_t get_thread_id () override
 
boost::future< void > do_change_permits (int32_t delta) override
 

Static Protected Attributes

static constexpr int32_t DRAIN_SESSION_ACQ_COUNT = 1024
 Since a proxy does not know how many permits will be drained on the Raft group, it uses this constant to increment its local session acquire count. More...
 

Member Data Documentation

◆ DRAIN_SESSION_ACQ_COUNT

constexpr int32_t hazelcast::cp::session_semaphore::DRAIN_SESSION_ACQ_COUNT = 1024
staticprotected

Since a proxy does not know how many permits will be drained on the Raft group, it uses this constant to increment its local session acquire count.

Then, it adjusts the local session acquire count after the drain response is returned.


The documentation for this class was generated from the following files: