Fix incorrect spelling of fileBackedStreamFactory 64/60064/1
authorTom Pantelis <tompantelis@gmail.com>
Fri, 7 Jul 2017 08:53:14 +0000 (04:53 -0400)
committerTom Pantelis <tompantelis@gmail.com>
Fri, 7 Jul 2017 08:53:14 +0000 (04:53 -0400)
filedBackedStreamFactory should be fileBackedStreamFactory.

Change-Id: Ib0b65d68d37c5b0ded4f1739d4ddc578973fe6ec
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Follower.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/messaging/MessageAssembler.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/messaging/MessageSlicer.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/messaging/MessageAssemblerTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/messaging/MessageSlicerTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/messaging/MessageSlicingIntegrationTest.java

index 9f0e032..11fa237 100644 (file)
@@ -78,7 +78,7 @@ public class Follower extends AbstractRaftActorBehavior {
             .getSyncIndexThreshold());
 
         appendEntriesMessageAssembler = MessageAssembler.builder().logContext(logName())
-                .filedBackedStreamFactory(context.getFileBackedOutputStreamFactory())
+                .fileBackedStreamFactory(context.getFileBackedOutputStreamFactory())
                 .assembledMessageCallback((message, sender) -> handleMessage(sender, message)).build();
 
         if (context.getPeerIds().isEmpty() && getLeaderId() == null) {
index 71b07f4..328ff0c 100644 (file)
@@ -36,12 +36,12 @@ public class MessageAssembler implements AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(MessageAssembler.class);
 
     private final Cache<Identifier, AssembledMessageState> stateCache;
-    private final FileBackedOutputStreamFactory filedBackedStreamFactory;
+    private final FileBackedOutputStreamFactory fileBackedStreamFactory;
     private final BiConsumer<Object, ActorRef> assembledMessageCallback;
     private final String logContext;
 
     private MessageAssembler(Builder builder) {
-        this.filedBackedStreamFactory = Preconditions.checkNotNull(builder.filedBackedStreamFactory,
+        this.fileBackedStreamFactory = Preconditions.checkNotNull(builder.fileBackedStreamFactory,
                 "FiledBackedStreamFactory cannot be null");
         this.assembledMessageCallback = Preconditions.checkNotNull(builder.assembledMessageCallback,
                 "assembledMessageCallback cannot be null");
@@ -135,7 +135,7 @@ public class MessageAssembler implements AutoCloseable {
         if (messageSlice.getSliceIndex() == SlicedMessageState.FIRST_SLICE_INDEX) {
             LOG.debug("{}: Received first slice for {} - creating AssembledMessageState", logContext, identifier);
             return new AssembledMessageState(identifier, messageSlice.getTotalSlices(),
-                    filedBackedStreamFactory, logContext);
+                    fileBackedStreamFactory, logContext);
         }
 
         LOG.debug("{}: AssembledMessageState not found for {} - returning failed reply", logContext, identifier);
@@ -218,7 +218,7 @@ public class MessageAssembler implements AutoCloseable {
     }
 
     public static class Builder {
-        private FileBackedOutputStreamFactory filedBackedStreamFactory;
+        private FileBackedOutputStreamFactory fileBackedStreamFactory;
         private BiConsumer<Object, ActorRef> assembledMessageCallback;
         private long expireStateAfterInactivityDuration = 1;
         private TimeUnit expireStateAfterInactivityUnit = TimeUnit.MINUTES;
@@ -227,11 +227,11 @@ public class MessageAssembler implements AutoCloseable {
         /**
          * Sets the factory for creating FileBackedOutputStream instances used for streaming messages.
          *
-         * @param newFiledBackedStreamFactory the factory for creating FileBackedOutputStream instances
+         * @param newFileBackedStreamFactory the factory for creating FileBackedOutputStream instances
          * @return this Builder
          */
-        public Builder filedBackedStreamFactory(final FileBackedOutputStreamFactory newFiledBackedStreamFactory) {
-            this.filedBackedStreamFactory = Preconditions.checkNotNull(newFiledBackedStreamFactory);
+        public Builder fileBackedStreamFactory(final FileBackedOutputStreamFactory newFileBackedStreamFactory) {
+            this.fileBackedStreamFactory = Preconditions.checkNotNull(newFileBackedStreamFactory);
             return this;
         }
 
index 1647375..1454e72 100644 (file)
@@ -38,14 +38,14 @@ public class MessageSlicer implements AutoCloseable {
     public static final int DEFAULT_MAX_SLICING_TRIES = 3;
 
     private final Cache<Identifier, SlicedMessageState<ActorRef>> stateCache;
-    private final FileBackedOutputStreamFactory filedBackedStreamFactory;
+    private final FileBackedOutputStreamFactory fileBackedStreamFactory;
     private final int messageSliceSize;
     private final int maxSlicingTries;
     private final String logContext;
     private final long id;
 
     private MessageSlicer(Builder builder) {
-        this.filedBackedStreamFactory = builder.filedBackedStreamFactory;
+        this.fileBackedStreamFactory = builder.fileBackedStreamFactory;
         this.messageSliceSize = builder.messageSliceSize;
         this.maxSlicingTries = builder.maxSlicingTries;
 
@@ -100,11 +100,11 @@ public class MessageSlicer implements AutoCloseable {
         if (message != null) {
             LOG.debug("{}: slice: identifier: {}, message: {}", logContext, identifier, message);
 
-            Preconditions.checkNotNull(filedBackedStreamFactory,
+            Preconditions.checkNotNull(fileBackedStreamFactory,
                     "The FiledBackedStreamFactory must be set in order to call this slice method");
 
             // Serialize the message to a FileBackedOutputStream.
-            fileBackedStream = filedBackedStreamFactory.newInstance();
+            fileBackedStream = fileBackedStreamFactory.newInstance();
             try (ObjectOutputStream out = new ObjectOutputStream(fileBackedStream)) {
                 out.writeObject(message);
             } catch (IOException e) {
@@ -305,7 +305,7 @@ public class MessageSlicer implements AutoCloseable {
     }
 
     public static class Builder {
-        private FileBackedOutputStreamFactory filedBackedStreamFactory;
+        private FileBackedOutputStreamFactory fileBackedStreamFactory;
         private int messageSliceSize = -1;
         private long expireStateAfterInactivityDuration = -1;
         private TimeUnit expireStateAfterInactivityUnit = TimeUnit.MINUTES;
@@ -317,11 +317,11 @@ public class MessageSlicer implements AutoCloseable {
          * is used by the {@link MessageSlicer#slice(SliceOptions)} method if a Serializable message is passed.
          * If Serializable messages aren't passed then the factory need not be set.
          *
-         * @param newFiledBackedStreamFactory the factory for creating FileBackedOutputStream instances
+         * @param newFileBackedStreamFactory the factory for creating FileBackedOutputStream instances
          * @return this Builder
          */
-        public Builder filedBackedStreamFactory(final FileBackedOutputStreamFactory newFiledBackedStreamFactory) {
-            this.filedBackedStreamFactory = Preconditions.checkNotNull(newFiledBackedStreamFactory);
+        public Builder fileBackedStreamFactory(final FileBackedOutputStreamFactory newFileBackedStreamFactory) {
+            this.fileBackedStreamFactory = Preconditions.checkNotNull(newFileBackedStreamFactory);
             return this;
         }
 
index 7377305..209943e 100644 (file)
@@ -178,7 +178,7 @@ public class MessageAssemblerTest extends AbstractMessagingTest {
     }
 
     private Builder newMessageAssemblerBuilder(String logContext) {
-        return MessageAssembler.builder().filedBackedStreamFactory(mockFiledBackedStreamFactory)
+        return MessageAssembler.builder().fileBackedStreamFactory(mockFiledBackedStreamFactory)
                 .assembledMessageCallback(mockAssembledMessageCallback).logContext(logContext);
     }
 }
index df12ad2..ac6ab2e 100644 (file)
@@ -138,7 +138,7 @@ public class MessageSlicerTest extends AbstractMessagingTest {
         final int expiryDuration = 200;
         try (MessageSlicer slicer = MessageSlicer.builder().messageSliceSize(1)
                 .logContext("testCheckExpiredSlicedMessageState")
-                .filedBackedStreamFactory(mockFiledBackedStreamFactory)
+                .fileBackedStreamFactory(mockFiledBackedStreamFactory)
                 .expireStateAfterInactivity(expiryDuration, TimeUnit.MILLISECONDS).build()) {
             slice(slicer, IDENTIFIER, new BytesMessage(new byte[]{1, 2}), testProbe.ref(), testProbe.ref(),
                     mockOnFailureCallback);
@@ -159,7 +159,7 @@ public class MessageSlicerTest extends AbstractMessagingTest {
 
     private MessageSlicer newMessageSlicer(String logContext, final int messageSliceSize) {
         return MessageSlicer.builder().messageSliceSize(messageSliceSize).logContext(logContext)
-                .filedBackedStreamFactory(mockFiledBackedStreamFactory).build();
+                .fileBackedStreamFactory(mockFiledBackedStreamFactory).build();
     }
 
     static void slice(MessageSlicer slicer, Identifier identifier, Serializable message, ActorRef sendTo,
index a490a24..23d04b5 100644 (file)
@@ -63,7 +63,7 @@ public class MessageSlicingIntegrationTest {
 
     private final MessageAssembler assembler = MessageAssembler.builder()
             .assembledMessageCallback(mockAssembledMessageCallback).logContext("test")
-            .filedBackedStreamFactory(FILE_BACKED_STREAM_FACTORY).build();
+            .fileBackedStreamFactory(FILE_BACKED_STREAM_FACTORY).build();
 
     @Before
     public void setup() {
@@ -336,6 +336,6 @@ public class MessageSlicingIntegrationTest {
 
     private MessageSlicer newMessageSlicer(String logContext, final int messageSliceSize) {
         return MessageSlicer.builder().messageSliceSize(messageSliceSize).logContext(logContext)
-                .filedBackedStreamFactory(FILE_BACKED_STREAM_FACTORY).build();
+                .fileBackedStreamFactory(FILE_BACKED_STREAM_FACTORY).build();
     }
 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.