Author: frm
Date: Thu Nov 2 10:50:06 2017
New Revision: 1814056
URL: http://svn.apache.org/viewvc?rev=1814056&view=rev
Log:
OAK-6888 - Rename maybeFlush to tryFlush in FileStore and TarRevisions
Modified:
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarRevisions.java
Modified:
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java?rev=1814056&r1=1814055&r2=1814056&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
(original)
+++
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
Thu Nov 2 10:50:06 2017
@@ -212,7 +212,7 @@ public class FileStore extends AbstractF
return;
}
try {
- maybeFlush();
+ tryFlush();
} catch (IOException e) {
log.warn("Failed to flush the TarMK at {}",
directory, e);
}
@@ -313,21 +313,21 @@ public class FileStore extends AbstractF
return stats;
}
- private void doMaybeFlush() throws IOException {
+ private void doTryFlush() throws IOException {
if (revisions == null) {
log.debug("No TarRevisions available, skipping flush");
return;
}
- revisions.maybeFlush(() -> {
+ revisions.tryFlush(() -> {
segmentWriter.flush();
tarFiles.flush();
stats.flushed();
});
}
- private void maybeFlush() throws IOException {
+ private void tryFlush() throws IOException {
try (ShutDownCloser ignored = shutDown.keepAlive()) {
- doMaybeFlush();
+ doTryFlush();
}
}
Modified:
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarRevisions.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarRevisions.java?rev=1814056&r1=1814055&r2=1814056&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarRevisions.java
(original)
+++
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarRevisions.java
Thu Nov 2 10:50:06 2017
@@ -51,7 +51,7 @@ import org.slf4j.LoggerFactory;
/**
* This implementation of {@code Revisions} is backed by a
* {@link #JOURNAL_FILE_NAME journal} file where the current head is persisted
- * by calling {@link #maybeFlush(Flusher)}.
+ * by calling {@link #tryFlush(Flusher)}.
* <p>
* The {@link #setHead(Function, Option...)} method supports a timeout
* {@link Option}, which can be retrieved through factory methods of this
class.
@@ -179,7 +179,7 @@ public class TarRevisions implements Rev
/**
* Flush the id of the current head to the journal after a call to {@code
- * persisted}. Differently from {@link #maybeFlush(Flusher)}, this method
+ * persisted}. Differently from {@link #tryFlush(Flusher)}, this method
* does not return early if a concurrent call is in progress. Instead, it
* blocks the caller until the requested flush operation is performed.
*
@@ -209,7 +209,7 @@ public class TarRevisions implements Rev
* head state is actually persisted before its id is written
* to the head state.
*/
- void maybeFlush(Flusher flusher) throws IOException {
+ void tryFlush(Flusher flusher) throws IOException {
if (head.get() == null) {
LOG.debug("No head available, skipping flush");
return;