From 1c0678d1489c125aea96e99114315f10b12f7986 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Sun, 18 Oct 2009 21:50:47 +0000 Subject: [PATCH] LUCENE-1257: CommitPoint -> IndexCommit in generics git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@826533 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/index/IndexDeletionPolicy.java | 4 ++-- src/java/org/apache/lucene/index/IndexFileDeleter.java | 8 ++++---- .../lucene/index/KeepOnlyLastCommitDeletionPolicy.java | 4 ++-- .../org/apache/lucene/index/SnapshotDeletionPolicy.java | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/java/org/apache/lucene/index/IndexDeletionPolicy.java b/src/java/org/apache/lucene/index/IndexDeletionPolicy.java index d17c43e28b6..1308d5f4c96 100644 --- a/src/java/org/apache/lucene/index/IndexDeletionPolicy.java +++ b/src/java/org/apache/lucene/index/IndexDeletionPolicy.java @@ -70,7 +70,7 @@ public interface IndexDeletionPolicy { * {@link IndexCommit point-in-time commits}, * sorted by age (the 0th one is the oldest commit). */ - public void onInit(List commits) throws IOException; + public void onInit(List commits) throws IOException; /** *

This is called each time the writer completed a commit. @@ -94,5 +94,5 @@ public interface IndexDeletionPolicy { * @param commits List of {@link IndexCommit}, * sorted by age (the 0th one is the oldest commit). */ - public void onCommit(List commits) throws IOException; + public void onCommit(List commits) throws IOException; } diff --git a/src/java/org/apache/lucene/index/IndexFileDeleter.java b/src/java/org/apache/lucene/index/IndexFileDeleter.java index 6e8044fec00..77ebcaff909 100644 --- a/src/java/org/apache/lucene/index/IndexFileDeleter.java +++ b/src/java/org/apache/lucene/index/IndexFileDeleter.java @@ -84,14 +84,14 @@ final class IndexFileDeleter { * default delete policy (KeepOnlyLastCommitDeletionPolicy). * Other policies may leave commit points live for longer * in which case this list would be longer than 1: */ - private List commits = new ArrayList(); + private List commits = new ArrayList(); /* Holds files we had incref'd from the previous * non-commit checkpoint: */ private List> lastFiles = new ArrayList>(); /* Commits that the IndexDeletionPolicy have decided to delete: */ - private List commitsToDelete = new ArrayList(); + private List commitsToDelete = new ArrayList(); private PrintStream infoStream; private Directory directory; @@ -565,13 +565,13 @@ final class IndexFileDeleter { String segmentsFileName; boolean deleted; Directory directory; - Collection commitsToDelete; + Collection commitsToDelete; long version; long generation; final boolean isOptimized; final Map userData; - public CommitPoint(Collection commitsToDelete, Directory directory, SegmentInfos segmentInfos) throws IOException { + public CommitPoint(Collection commitsToDelete, Directory directory, SegmentInfos segmentInfos) throws IOException { this.directory = directory; this.commitsToDelete = commitsToDelete; userData = segmentInfos.getUserData(); diff --git a/src/java/org/apache/lucene/index/KeepOnlyLastCommitDeletionPolicy.java b/src/java/org/apache/lucene/index/KeepOnlyLastCommitDeletionPolicy.java index a2ce3ba19de..f73b97a5e49 100644 --- a/src/java/org/apache/lucene/index/KeepOnlyLastCommitDeletionPolicy.java +++ b/src/java/org/apache/lucene/index/KeepOnlyLastCommitDeletionPolicy.java @@ -31,7 +31,7 @@ public final class KeepOnlyLastCommitDeletionPolicy implements IndexDeletionPoli /** * Deletes all commits except the most recent one. */ - public void onInit(List commits) { + public void onInit(List commits) { // Note that commits.size() should normally be 1: onCommit(commits); } @@ -39,7 +39,7 @@ public final class KeepOnlyLastCommitDeletionPolicy implements IndexDeletionPoli /** * Deletes all commits except the most recent one. */ - public void onCommit(List commits) { + public void onCommit(List commits) { // Note that commits.size() should normally be 2 (if not // called by onInit above): int size = commits.size(); diff --git a/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java b/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java index 4f29bb1b8f5..7da7ac5d58e 100644 --- a/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java +++ b/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java @@ -52,12 +52,12 @@ public class SnapshotDeletionPolicy implements IndexDeletionPolicy { this.primary = primary; } - public synchronized void onInit(List commits) throws IOException { + public synchronized void onInit(List commits) throws IOException { primary.onInit(wrapCommits(commits)); lastCommit = commits.get(commits.size()-1); } - public synchronized void onCommit(List commits) throws IOException { + public synchronized void onCommit(List commits) throws IOException { primary.onCommit(wrapCommits(commits)); lastCommit = commits.get(commits.size()-1); } @@ -123,7 +123,7 @@ public class SnapshotDeletionPolicy implements IndexDeletionPolicy { } } - private List wrapCommits(List commits) { + private List wrapCommits(List commits) { final int count = commits.size(); List myCommits = new ArrayList(count); for(int i=0;i