2 * ============LICENSE_START====================================================
4 * ===========================================================================
5 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6 * ===========================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END====================================================
22 package org.onap.aaf.misc.env;
28 * A Trans is like an Env, however, it's purpose it to track the Transient
29 * Data associated with Transactions, or other short term elements.
31 * Any Object implementing Trans should expect to go in an out of scope quickly
33 * Implementations should also overload the concepts of "Start", etc and build up
34 * and Audit Log, so it can implement "metric" below
36 * All Transactions (i.e. a call to a service) will need these items.
41 public interface Trans extends Env {
43 * Add a completed entry in the Audit Trail for tracking purposes.
47 public void checkpoint(String text);
50 * Add a completed entry in the Audit Trail for tracking purposes, and combine flag with "CHECKPOINT"
54 public void checkpoint(String text, int additionalFlag);
57 * Output an Audit Trail onto the StringBuilder
59 * Load metrics into an array of floats from passed in Flags
65 public Metric auditTrail(LogTarget lt, int indent, StringBuilder sb, int ... flag);
67 public Metric auditTrail(int indent, StringBuilder sb, int ... flag);
70 public float[] buckets;