class QueryContextKey {
    /** */
    private final UUID nodeId;

    /** */
    private final long qryId;

    /** */
    private final int segmentId;

    /**
     * Constructor.
     *
     * @param nodeId The node who initiated the query.
     * @param qryId The query ID.
     * @param segmentId Index segment ID.
     */
    public QueryContextKey(UUID nodeId, long qryId, int segmentId) {
        assert nodeId != null;

        this.nodeId = nodeId;
        this.qryId = qryId;
        this.segmentId = segmentId;
    }

    /**
     * @return Node ID.
     */
    public UUID nodeId() {
        return nodeId;
    }

    /**
     * @return Query ID.
     */
    public long queryId() {
        return qryId;
    }

    /**
     * @return Segment ID.
     */
    public int segmentId() {
        return segmentId;
    }

    /** {@inheritDoc} */
    @Override public boolean equals(Object o) {
        if (this == o)
            return true;

        if (o == null || getClass() != o.getClass())
            return false;

        QueryContextKey other = (QueryContextKey)o;

        return qryId == other.qryId && segmentId == other.segmentId && F.eq(nodeId, other.nodeId);
    }

    /** {@inheritDoc} */
    @Override public int hashCode() {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public String toString() {
        return S.toString(QueryContextKey.class, this);
    }
}

        int res = nodeId.hashCode();

        res = 31 * res + (int)(qryId ^ (qryId >>> 32));
        res = 31 * res + segmentId;

        return res;
    
<no_super_class>