/** * Creates a session id which is unique across the cluster this runtime is a member of each time this is called. * Calling this causes synchronization. */ public static UniqueRequestId next(String serverId) { return new UniqueRequestId(serverId, System.currentTimeMillis(), sequenceCounter.getAndIncrement()); }
public SessionId(UniqueRequestId requestId, String localSessionId) { this.id = new Utf8String(requestId.toString() + "." + localSessionId); }
/** Returns the session id of this query, and creates and assigns it if not already present */ public SessionId getSessionId(String serverId) { if (requestId == null) requestId = UniqueRequestId.next(serverId); return new SessionId(requestId, getRanking().getProfile()); }