Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*-
   * See the file LICENSE for redistribution information.
   *
   * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
   *
   */
  
  package com.sleepycat.je;
  
Specifies the attributes of a statistics retrieval operation.
 
 public class StatsConfig implements Cloneable {

    
A convenience instance embodying the default configuration.
 
     public static final StatsConfig DEFAULT = new StatsConfig();
 
     private boolean fast = false;
     private boolean clear = false;
     private PrintStream showProgressStream = null;
     private int showProgressInterval = 0;

    
An instance created using the default constructor is initialized with the system's default settings.
 
     public StatsConfig() {
     }

    
Configures the statistics operation to return only the values which do not incur some performance penalty.

The default value is false.

For example, skip stats that require a traversal of the database or in-memory tree, or which lock down the lock table for a period of time.

Parameters:
fast If set to true, configure the statistics operation to return only the values which do not incur some performance penalty.
Returns:
this
 
     public StatsConfig setFast(boolean fast) {
         setFastVoid(fast);
         return this;
     }
    
    

Hidden:
The void return setter for use by Bean editors.
 
     public void setFastVoid(boolean fast) {
         this. = fast;
     }

    
Returns true if the statistics operation is configured to return only the values which do not require expensive actions.

Returns:
true if the statistics operation is configured to return only the values which do not require expensive actions.
 
     public boolean getFast() {
         return ;
     }

    
Configures the statistics operation to reset statistics after they are returned. The default value is false.

Parameters:
clear If set to true, configure the statistics operation to reset statistics after they are returned.
Returns:
this
 
     public StatsConfig setClear(boolean clear) {
         setClearVoid(clear);
         return this;
     }
    
    

Hidden:
The void return setter for use by Bean editors.
 
     public void setClearVoid(boolean clear) {
         this. = clear;
     }

    
Returns true if the statistics operation is configured to reset statistics after they are returned.

Returns:
true if the statistics operation is configured to reset statistics after they are returned.
    public boolean getClear() {
        return ;
    }

    
Configures the statistics operation to display progress to the PrintStream argument. The accumulated statistics will be displayed every N records, where N is the value of showProgressInterval.

Returns:
this
    public StatsConfig setShowProgressStream(PrintStream showProgressStream) {
        setShowProgressStreamVoid(showProgressStream);
        return this;
    }
    
    

Hidden:
The void return setter for use by Bean editors.
    public void setShowProgressStreamVoid(PrintStream showProgressStream) {
        this. = showProgressStream;
    }

    
Returns the PrintStream on which the progress messages will be displayed during long running statistics gathering operations.
        return ;
    }

    
When the statistics operation is configured to display progress the showProgressInterval is the number of LNs between each progress report.

Returns:
this
    public StatsConfig setShowProgressInterval(int showProgressInterval) {
        setShowProgressIntervalVoid(showProgressInterval);
        return this;
    }
    
    

Hidden:
The void return setter for use by Bean editors.
    public void setShowProgressIntervalVoid(int showProgressInterval) {
        this. = showProgressInterval;
    }

    
Returns the showProgressInterval value, if set.
    public int getShowProgressInterval() {
        return ;
    }

    
Returns a copy of this configuration object.
    @Override
    public StatsConfig clone() {
        try {
            return (StatsConfigsuper.clone();
        } catch (CloneNotSupportedException willNeverOccur) {
            return null;
        }
    }

    
Returns the values for each configuration attribute.

Returns:
the values for each configuration attribute.
    @Override
    public String toString() {
        return "fast=" +  +
            "\nclear=" +  +
            "\nshowProgressStream=" +  +
            "\nshowProgressInterval=" +  +
            "\n";
    }
New to GrepCode? Check out our FAQ X