class QueryMetadata {

  public long uptime() {
    return queryStateListener.map(QueryStateListener::uptime).orElse(0L);
  }

  @VisibleForTesting  QueryMetadata(
      final String statementString,
      final LogicalSchema logicalSchema,
      final Set<SourceName> sourceNames,
      final String executionPlan,
      final String queryApplicationId,
      final Topology topology,
      final KafkaStreamsBuilder kafkaStreamsBuilder,
      final Map<String, Object> streamsProperties,
      final Map<String, Object> overriddenProperties,
      final Consumer<QueryMetadata> closeCallback,
      final long closeTimeout,
      final QueryId queryId,
      final QueryErrorClassifier errorClassifier,
      final int maxQueryErrorsQueueSize
  );
  protected  QueryMetadata(final QueryMetadata other, final Consumer<QueryMetadata> closeCallback);

}