export default class PooledRunnerBrokerIdentity { closeConnections: () => Promise; /** @type {string | undefined} */ activeIdentity: string | undefined; /** @type {{identity: string, promise: Promise} | undefined} */ pending: { identity: string; promise: Promise; } | undefined; activeUsers: number; /** * Creates a pooled runner identity coordinator. * @param {{closeConnections: () => Promise}} args - Connection cleanup hook. */ constructor({ closeConnections }: { closeConnections: () => Promise; }); /** * Gets the current prepared identity. * @returns {string | undefined} - Current prepared identity. */ current(): string | undefined; /** * Prepares one identity, sharing an in-flight same-identity rotation. * @param {import("../testing/shared-transaction-proxy-driver.js").SharedTransactionBrokerJobConfig} config - Dispatch configuration. * @param {boolean} [admissionReserved] - Whether the caller already reserved its active-user slot. * @returns {Promise} - Resolves after stale connections close. */ prepare(config: import("../testing/shared-transaction-proxy-driver.js").SharedTransactionBrokerJobConfig, admissionReserved?: boolean): Promise; /** * Runs work while preventing a different identity from replacing its connections. * @template T * @param {import("../testing/shared-transaction-proxy-driver.js").SharedTransactionBrokerJobConfig} config - Dispatch configuration. * @param {() => Promise} callback - Job callback. * @returns {Promise} - Job result. */ run(config: import("../testing/shared-transaction-proxy-driver.js").SharedTransactionBrokerJobConfig, callback: () => Promise): Promise; /** * Atomically prepares an attempt identity and reserves its active user. Without * this admission turn, another capability can rotate connections after `prepare` * resolves but before `run` increments `activeUsers`. * @param {import("../testing/shared-transaction-proxy-driver.js").SharedTransactionBrokerJobConfig} config - Dispatch configuration. * @returns {Promise} - Resolves after admission is reserved. */ admit(config: import("../testing/shared-transaction-proxy-driver.js").SharedTransactionBrokerJobConfig): Promise; /** * Rotates retained connection state to an identity. * @param {string} identity - Target identity. * @returns {Promise} - Resolves after rotation. */ rotate(identity: string): Promise; } //# sourceMappingURL=pooled-runner-broker-identity.d.ts.map