mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
14.11.2015 da0ab2365152aba4ed332d6e1f49ba9d60119ccf
Code cleanup
1 files modified
26 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/replication/server/changelog/file/Log.java 26 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/server/changelog/file/Log.java
@@ -257,7 +257,6 @@
  /** Holds the parameters for log files rotation. */
  static class LogRotationParameters {
    private final long sizeLimitPerFileInBytes;
    private final long rotationInterval;
    private final long lastRotationTime;
@@ -279,6 +278,15 @@
      this.lastRotationTime = lastRotationTime;
    }
    @Override
    public String toString()
    {
      return getClass().getSimpleName() + "("
          + "sizeLimitPerFileInBytes=" + sizeLimitPerFileInBytes
          + ", rotationInterval=" + rotationInterval
          + ", lastRotationTime=" + lastRotationTime
          + ")";
    }
  }
  /**
@@ -509,10 +517,7 @@
    return false;
  }
  /**
   * Indicates if the provided record has a key that would break the key
   * ordering in the log.
   */
  /** Indicates if the provided record has a key that would break the key ordering in the log. */
  private boolean recordIsBreakingKeyOrdering(final Record<K, V> record)
  {
    return lastAppendedKey != null && record.getKey().compareTo(lastAppendedKey) <= 0;
@@ -669,7 +674,6 @@
    }
  }
  /**
   * Returns the newest (last) record from this log.
   *
@@ -771,11 +775,11 @@
    {
      exclusiveLock.unlock();
    }
  }
  /**
   * Abort all cursors opened on the provided log file.
   * <p>
   * @GuardedBy("exclusiveLock")
   */
  private void abortCursorsOpenOnLogFile(LogFile<K, V> logFile)
@@ -1166,7 +1170,7 @@
  private boolean isHeadLogFile(final LogFile<K, V> logFile)
  {
    return logFile.getFile().getName().equals(Log.HEAD_LOG_FILE_NAME);
    return Log.HEAD_LOG_FILE_NAME.equals(logFile.getFile().getName());
  }
  /** @GuardedBy("sharedLock") */
@@ -1220,9 +1224,8 @@
   * <p>
   * This is an abstract class rather than an interface to allow reduced visibility of the methods.
   */
  private abstract static class LogCursor<K extends Comparable<K>, V> implements RepositionableCursor<K, V>
  private static abstract class LogCursor<K extends Comparable<K>, V> implements RepositionableCursor<K, V>
  {
    /** Closes the underlying cursor. */
    abstract void closeUnderlyingCursor();
@@ -1234,7 +1237,6 @@
    /** Returns true if cursor is pointing on provided log file. */
    abstract boolean isAccessingLogFile(LogFile<K, V> logFile);
  }
  /**
@@ -1376,7 +1378,6 @@
      return  String.format("Cursor on log : %s, current log file: %s, current cursor: %s",
              log.logPath, currentLogFile.getFile().getName(), currentCursor);
    }
  }
  /**
@@ -1668,5 +1669,4 @@
      return isValid;
    }
  }
}