public long getWALFlushTime() {
    switchLock.acquireReadLock();
    try {
      if (enabled) {
        final WALCountersHolder holder = fetchWALCounters();

        if (holder != null)
          return holder.getFlushTime();

        return -1;
      } else {
        final ImmutableStatistic post = postMeasurementStatistic;
        if (post == null)
          return -1;

        final WALCountersHolder holder = post.walCountersHolder;
        if (holder != null)
          return holder.getFlushTime();

        return -1;
      }
    } finally {
      switchLock.releaseReadLock();
    }
  }
public long getWALFlushTime ( ) { switchLock . acquireReadLock ( ) ; try { if ( enabled ) { final WALCountersHolder holder = fetchWALCounters ( ) ; if ( holder != null ) return holder . getFlushTime ( ) ; return - 1 ; } else { final ImmutableStatistic post = postMeasurementStatistic ; if ( post == null ) return - 1 ; final WALCountersHolder holder = post . walCountersHolder ; if ( holder != null ) return holder . getFlushTime ( ) ; return - 1 ; } } finally { switchLock . releaseReadLock ( ) ; } }
@return time which is spent on flush of WAL cache or <code>-1</code> if value is undefined