Examples of MetricAware


Examples of com.amazonaws.internal.MetricAware

     */
    private static boolean wrapWithByteCounting(InputStream in) {
        if (!AwsSdkMetrics.isMetricsEnabled())
            return false;   // metrics is disabled
        if (in instanceof MetricAware) {
            MetricAware aware = (MetricAware)in;
            // wrap only if not already wrapped in one of it's inner chain of input stream
            return !aware.isMetricActivated();
        }
        return true; // this is a raw input stream so metric wrapping is necessary
    }
View Full Code Here

Examples of com.amazonaws.internal.MetricAware

     */
    private static boolean wrapWithByteCounting(InputStream in) {
        if (!AwsSdkMetrics.isMetricsEnabled())
            return false;   // metrics is disabled
        if (in instanceof MetricAware) {
            MetricAware aware = (MetricAware)in;
            // wrap only if not already wrapped in one of it's inner chain of input stream
            return !aware.isMetricActivated();
        }
        return true; // this is a raw input stream so metric wrapping is necessary
    }
View Full Code Here

Examples of com.amazonaws.internal.MetricAware

    public void writeTo(final OutputStream outstream) throws IOException {
        if (outstream instanceof MetricAware) {
            // hchar: There is currently no implementation of output stream that
            // has metric gathering capability but there could be!
            // So the code here is for future proof purposes.
            MetricAware aware = (MetricAware)outstream;
            if (aware.isMetricActivated()) {
                // let the underlying output stream takes care of byte counting
                super.writeTo(outstream);
                return;
            }
        }
View Full Code Here

Examples of com.amazonaws.internal.MetricAware

     */
    private static boolean wrapWithByteCounting(InputStream in) {
        if (!AwsSdkMetrics.isMetricsEnabled())
            return false;   // metrics is disabled
        if (in instanceof MetricAware) {
            MetricAware aware = (MetricAware)in;
            // wrap only if not already wrapped in one of it's inner chain of input stream
            return !aware.isMetricActivated();
        }
        return true; // this is a raw input stream so metric wrapping is necessary
    }
View Full Code Here

Examples of com.amazonaws.internal.MetricAware

     */
    private static boolean wrapWithByteCounting(InputStream in) {
        if (!AwsSdkMetrics.isMetricsEnabled())
            return false;   // metrics is disabled
        if (in instanceof MetricAware) {
            MetricAware aware = (MetricAware)in;
            // wrap only if not already wrapped in one of it's inner chain of input stream
            return !aware.isMetricActivated();
        }
        return true; // this is a raw input stream so metric wrapping is necessary
    }
View Full Code Here

Examples of com.amazonaws.internal.MetricAware

    public void writeTo(final OutputStream outstream) throws IOException {
        if (outstream instanceof MetricAware) {
            // hchar: There is currently no implementation of output stream that
            // has metric gathering capability but there could be!
            // So the code here is for future proof purposes.
            MetricAware aware = (MetricAware)outstream;
            if (aware.isMetricActivated()) {
                // let the underlying output stream takes care of byte counting
                super.writeTo(outstream);
                return;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.