Example usage for java.util.function Consumer hashCode

List of usage examples for java.util.function Consumer hashCode

Introduction

In this page you can find the example usage for java.util.function Consumer hashCode.

Prototype

@HotSpotIntrinsicCandidate
public native int hashCode();

Source Link

Document

Returns a hash code value for the object.

Usage

From source file:io.tilt.minka.business.impl.TransportlessLeaderShardContainer.java

public final void observeForChange(Consumer<NetworkShardID> consumer) {
    logger.info("{}: ({}) Adding to observation group: {} (hash {})", getClass().getSimpleName(), myShardId,
            consumer, consumer.hashCode());
    this.observers.add(consumer);

    // already elected then tell him 
    if (leaderShardId != null) {
        logger.info("{}: ({}) Leader election already happened !: calling {} for consumption (hash {})",
                getClass().getSimpleName(), myShardId, consumer, consumer.hashCode());
        consumer.accept(leaderShardId);/*  ww w . j a  v  a2 s .  c  o m*/
    }
}