Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.clustermate.service;
 
Helper class used for requesting and returning per-operation statistics so that caller can update metrics and diagnostic information
 
 public class OperationDiagnostics
    protected final long _nanoStart;
    
    protected Storable _entry;

    
Number of items included in response, for operations where this makes sense.
    protected int _itemCount;
    
    /*
    /**********************************************************************
    /* Construction, population
    /**********************************************************************
     */
    public OperationDiagnostics() {
        this(System.nanoTime());
    }
    public OperationDiagnostics(long nanoStart) {
         = nanoStart;
    }
    
    public OperationDiagnostics setEntry(Storable e) {
         = e;
        return this;
    }
    public OperationDiagnostics setItemCount(int count) {
         = count;
        return this;
    }
    
    /*
    /**********************************************************************
    /* Accessors
    /**********************************************************************
     */
    
    public Storable getEntry() { return ; }
    public int getItemCount() { return ; }
    
    
Accessor for number of nanoseconds spent since construction of this object
    public long getNanosSpent() {
        return System.nanoTime() - ;
    }
New to GrepCode? Check out our FAQ X