Skip to content

Commit

Permalink
Fix unused parameter warnings for all components
Browse files Browse the repository at this point in the history
  • Loading branch information
cngzhnp committed Mar 15, 2023
1 parent 75b231e commit d45685a
Show file tree
Hide file tree
Showing 33 changed files with 132 additions and 144 deletions.
2 changes: 0 additions & 2 deletions hazelcast/include/hazelcast/client/connection/Connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class address;
class socket_interceptor;

namespace connection {
class ClientConnectionManagerImpl;

class HAZELCAST_API Connection
: public util::Closeable
Expand All @@ -70,7 +69,6 @@ class HAZELCAST_API Connection
spi::ClientContext& client_context,
int32_t connection_id,
internal::socket::SocketFactory& socket_factory,
ClientConnectionManagerImpl& client_connection_manager,
std::chrono::milliseconds& connect_timeout_in_millis);

~Connection() override;
Expand Down
10 changes: 5 additions & 5 deletions hazelcast/include/hazelcast/client/impl/EntryEventHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ class EntryEventHandler : public BaseType

private:
void fire_map_wide_event(
const boost::optional<serialization::pimpl::data>& key,
const boost::optional<serialization::pimpl::data>& value,
const boost::optional<serialization::pimpl::data>& old_value,
const boost::optional<serialization::pimpl::data>& merging_value,
const boost::optional<serialization::pimpl::data>& /* key */,
const boost::optional<serialization::pimpl::data>& /* value */,
const boost::optional<serialization::pimpl::data>& /* old_value */,
const boost::optional<serialization::pimpl::data>& /* merging_value */,
int32_t event_type,
boost::uuids::uuid uuid,
int32_t number_of_affected_entries)
Expand All @@ -114,7 +114,7 @@ class EntryEventHandler : public BaseType
const boost::optional<serialization::pimpl::data>& merging_value,
int32_t event_type,
boost::uuids::uuid uuid,
int32_t number_of_affected_entries)
int32_t /* number_of_affected_entries */)
{
typed_data eventKey, val, oldVal, mergingVal;
if (include_value_) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class EvictableStore
*/
virtual int evict(
std::vector<std::shared_ptr<EvictionCandidate<MAPKEY, MAPVALUE, A, E>>>*
eviction_candidates,
EvictionListener<A, E>* eviction_listener)
/* eviction_candidates */,
EvictionListener<A, E>* /* eviction_listener */)
{
assert(0);
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ class EvictionListener
* @param wasExpired {@code true} if the entry was evicted due to
* expiration, {@code false} otherwise
*/
virtual void on_evict(const std::shared_ptr<A>& evicted_entry_accessor,
const std::shared_ptr<E>& evicted_entry,
bool was_expired)
virtual void on_evict(const std::shared_ptr<A>& /* evicted_entry_accessor */,
const std::shared_ptr<E>& /* evicted_entry */,
bool /* was_expired */)
{
assert(0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class EvictionPolicyComparator : util::Comparator<EvictableEntryView<K, V>>
*
* @return the result of comparison
*/
int compare(const EvictableEntryView<K, V>* e1,
const EvictableEntryView<K, V>* e2) const override
int compare(const EvictableEntryView<K, V>* /* e1 */,
const EvictableEntryView<K, V>* /* e2 */) const override
{
assert(0);
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class EvictionPolicyEvaluator
virtual std::unique_ptr<std::vector<
std::shared_ptr<eviction::EvictionCandidate<MAPKEY, MAPVALUE, A, E>>>>
evaluate(util::Iterable<EvictionCandidate<MAPKEY, MAPVALUE, A, E>>&
eviction_candidates) const
/* eviction_candidates */) const
{
assert(0);
return std::unique_ptr<std::vector<std::shared_ptr<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ class EvictionStrategy
*
* @return evicted entry count
*/
virtual int evict(S* evictable_store,
virtual int evict(S* /* evictable_store*/,
EvictionPolicyEvaluator<MAPKEY, MAPVALUE, A, E>*
eviction_policy_evaluator,
EvictionChecker* eviction_checker,
EvictionListener<A, E>* eviction_listener)
/* eviction_policy_evaluator*/,
EvictionChecker* /* eviction_checker*/,
EvictionListener<A, E>* /* eviction_listener */)
{
assert(0);
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ template<typename A, typename E>
class RandomEvictionPolicyComparator : public EvictionPolicyComparator<A, E>
{
public:
int compare(const EvictableEntryView<A, E>* e1,
const EvictableEntryView<A, E>* e2) const override
int compare(const EvictableEntryView<A, E>* /* e1 */,
const EvictableEntryView<A, E>* /* e2 */) const override
{
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ class AbstractEvictionStrategy
* @return evicted entry count
*/
protected:
virtual int evict_internal(S* evictable_store,
virtual int evict_internal(S* /* evictable_store */,
EvictionPolicyEvaluator<MAPKEY, MAPVALUE, A, E>*
eviction_policy_evaluator,
EvictionListener<A, E>* eviction_listener)
/* eviction_policy_evaluator */,
EvictionListener<A, E>* /* eviction_listener */)
{
assert(0);
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class NearCache : public BaseNearCache
* @param key the key of the requested value
* @return the value associated with the given <code>key</code>
*/
virtual std::shared_ptr<V> get(const std::shared_ptr<K>& key)
virtual std::shared_ptr<V> get(const std::shared_ptr<K>& /* key */)
{
assert(0);
return std::shared_ptr<V>();
Expand All @@ -126,8 +126,8 @@ class NearCache : public BaseNearCache
* @param key the key of the value will be stored
* @param value the value will be stored
*/
virtual void put(const std::shared_ptr<K>& key,
const std::shared_ptr<V>& value)
virtual void put(const std::shared_ptr<K>& /* key */,
const std::shared_ptr<V>& /* value */)
{
assert(0);
}
Expand All @@ -151,7 +151,7 @@ class NearCache : public BaseNearCache
*
* @param key the key of the value will be invalidated
*/
virtual bool invalidate(const std::shared_ptr<K>& key)
virtual bool invalidate(const std::shared_ptr<K>& /* key */)
{
assert(0);
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,29 +59,29 @@ class NearCacheRecord
*
* @param value the value for this {@link NearCacheRecord}
*/
virtual void set_value(const std::shared_ptr<V>& value) { assert(0); }
virtual void set_value(const std::shared_ptr<V>& /* value */) { assert(0); }

/**
* Sets the creation time of this {@link Evictable} in milliseconds.
*
* @param time the creation time for this {@link Evictable} in milliseconds
*/
virtual void set_creation_time(int64_t time) = 0;
virtual void set_creation_time(int64_t /* time */) = 0;

/**
* Sets the access time of this {@link Evictable} in milliseconds.
*
* @param time the latest access time of this {@link Evictable} in
* milliseconds
*/
virtual void set_access_time(int64_t time) = 0;
virtual void set_access_time(int64_t /* time */) = 0;

/**
* Sets the access hit count of this {@link Evictable}.
*
* @param hit the access hit count for this {@link Evictable}
*/
virtual void set_access_hit(int32_t hit) = 0;
virtual void set_access_hit(int32_t /* hit */) = 0;

/**
* Increases the access hit count of this {@link Evictable} by {@code 1}.
Expand All @@ -102,7 +102,7 @@ class NearCacheRecord
* @param now current time in milliseconds
* @return {@code true} if exceeds max idle seconds, otherwise {@code false}
*/
virtual bool is_idle_at(int64_t max_idle_milli_seconds, int64_t now) = 0;
virtual bool is_idle_at(int64_t /* max_idle_milli_seconds */, int64_t /* now */) = 0;

/**
* @return last known invalidation sequence at time of this records'
Expand All @@ -114,19 +114,19 @@ class NearCacheRecord
* @param sequence last known invalidation sequence at time of this records'
* creation
*/
virtual void set_invalidation_sequence(int64_t sequence) = 0;
virtual void set_invalidation_sequence(int64_t /* sequence */) = 0;

/**
* @param uuid last known uuid of invalidation source at time of this
* records' creation
*/
virtual void set_uuid(boost::uuids::uuid uuid) = 0;
virtual void set_uuid(boost::uuids::uuid /* uuid */) = 0;

/**
* @return {@code true} if supplied uuid equals existing one, otherwise and
* when one of supplied or existing is null returns {@code false}
*/
virtual bool has_same_uuid(boost::uuids::uuid that_uuid) const = 0;
virtual bool has_same_uuid(boost::uuids::uuid /* that_uuid */) const = 0;
};
} // namespace nearcache
} // namespace internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class DefaultNearCache : public NearCache<KS, V>
{
if (near_cache_record_store_.get() == NULL) {
near_cache_record_store_ =
create_near_cache_record_store(name_, near_cache_config_);
create_near_cache_record_store(near_cache_config_);
}
near_cache_record_store_->initialize();

Expand Down Expand Up @@ -152,7 +152,6 @@ class DefaultNearCache : public NearCache<KS, V>

private:
std::unique_ptr<NearCacheRecordStore<KS, V>> create_near_cache_record_store(
const std::string& name,
const client::config::near_cache_config& near_cache_config)
{
client::config::in_memory_format inMemoryFormat =
Expand All @@ -161,11 +160,11 @@ class DefaultNearCache : public NearCache<KS, V>
case client::config::BINARY:
return std::unique_ptr<NearCacheRecordStore<KS, V>>(
new store::NearCacheDataRecordStore<K, V, KS>(
name, near_cache_config, serialization_service_));
near_cache_config, serialization_service_));
case client::config::OBJECT:
return std::unique_ptr<NearCacheRecordStore<KS, V>>(
new store::NearCacheObjectRecordStore<K, V, KS>(
name, near_cache_config, serialization_service_));
near_cache_config, serialization_service_));
default:
std::ostringstream out;
out << "Invalid in memory format: " << (int)inMemoryFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class NearCacheRecordStore : public spi::InitializingObject
* @param key the key from which to get the associated value.
* @return the value associated with the given {@code key}.
*/
virtual std::shared_ptr<V> get(const std::shared_ptr<K>& key)
virtual std::shared_ptr<V> get(const std::shared_ptr<K>& /* key */)
{
assert(0);
return std::shared_ptr<V>();
Expand All @@ -72,8 +72,8 @@ class NearCacheRecordStore : public spi::InitializingObject
* @param key the key to which the given value will be associated.
* @param value the value that will be associated with the key.
*/
virtual void put(const std::shared_ptr<K>& key,
const std::shared_ptr<V>& value)
virtual void put(const std::shared_ptr<K>& /* key */,
const std::shared_ptr<V>& /* value */)
{
assert(0);
}
Expand All @@ -97,7 +97,7 @@ class NearCacheRecordStore : public spi::InitializingObject
*
* @param key the key of the value will be invalidated
*/
virtual bool invalidate(const std::shared_ptr<K>& key)
virtual bool invalidate(const std::shared_ptr<K>& /* key */)
{
assert(0);
return false;
Expand Down Expand Up @@ -133,8 +133,8 @@ class NearCacheRecordStore : public spi::InitializingObject
* {@code candidates}.
*/
virtual const std::shared_ptr<V> select_to_save(
const std::shared_ptr<V>& value,
const std::shared_ptr<serialization::pimpl::data>& value_data) const
const std::shared_ptr<V>& /* value */,
const std::shared_ptr<serialization::pimpl::data>& /* value_data */) const
{
assert(0);
return std::shared_ptr<V>();
Expand Down

0 comments on commit d45685a

Please sign in to comment.