Repository: reef
Updated Branches:
  refs/heads/master 8da526afa -> ad896d195


[REEF-1134] Make Codec instantiation in Wake consistent

This addressed the issue by
  * Deprecating superfluous classes and related Configuration.
  * Deprecating ICodecFactory.

JIRA:
  [REEF-1134](https://issues.apache.org/jira/browse/REEF-1134)

Pull Request:
  This closes #778


Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/ad896d19
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/ad896d19
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/ad896d19

Branch: refs/heads/master
Commit: ad896d1956d496fc06685ede4aad9627fdb9a07b
Parents: 8da526a
Author: Andrew Chung <[email protected]>
Authored: Tue Jan 19 11:59:06 2016 -0800
Committer: Markus Weimer <[email protected]>
Committed: Thu Jan 21 15:42:11 2016 -0800

----------------------------------------------------------------------
 .../NetworkService/NetworkServiceConfiguration.cs                 | 2 ++
 lang/cs/Org.Apache.REEF.Wake/Remote/ICodec.cs                     | 3 +++
 lang/cs/Org.Apache.REEF.Wake/Remote/ICodecFactory.cs              | 2 ++
 lang/cs/Org.Apache.REEF.Wake/Remote/IDecoder.cs                   | 3 +++
 lang/cs/Org.Apache.REEF.Wake/Remote/IEncoder.cs                   | 3 +++
 lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodecFactory.cs      | 2 ++
 lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiCodec.cs            | 3 +++
 7 files changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/ad896d19/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkServiceConfiguration.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkServiceConfiguration.cs 
b/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkServiceConfiguration.cs
index 56d793e..a5407ba 100644
--- 
a/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkServiceConfiguration.cs
+++ 
b/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkServiceConfiguration.cs
@@ -15,6 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
+using System;
 using System.Diagnostics.CodeAnalysis;
 using Org.Apache.REEF.Common.Io;
 using Org.Apache.REEF.Tang.Formats;
@@ -23,6 +24,7 @@ using Org.Apache.REEF.Wake.Remote;
 
 namespace Org.Apache.REEF.Network.NetworkService
 {
+    [Obsolete("Deprecated in 0.14.")]
     public class NetworkServiceConfiguration : ConfigurationModuleBuilder
     {
         [SuppressMessage("Microsoft.Security", "CA2104:Do not declare read 
only mutable reference types", Justification = "not applicable")] 

http://git-wip-us.apache.org/repos/asf/reef/blob/ad896d19/lang/cs/Org.Apache.REEF.Wake/Remote/ICodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/ICodec.cs 
b/lang/cs/Org.Apache.REEF.Wake/Remote/ICodec.cs
index 44675c1..3ef9e54 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/ICodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/ICodec.cs
@@ -15,8 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
+using System;
+
 namespace Org.Apache.REEF.Wake.Remote
 {
+    [Obsolete("Deprecated in 0.14, please use ICodec<T> instead.")]
     public interface ICodec
     {
     }

http://git-wip-us.apache.org/repos/asf/reef/blob/ad896d19/lang/cs/Org.Apache.REEF.Wake/Remote/ICodecFactory.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/ICodecFactory.cs 
b/lang/cs/Org.Apache.REEF.Wake/Remote/ICodecFactory.cs
index ecf78f4..6538f05 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/ICodecFactory.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/ICodecFactory.cs
@@ -15,11 +15,13 @@
 // specific language governing permissions and limitations
 // under the License.
 
+using System;
 using Org.Apache.REEF.Tang.Annotations;
 using Org.Apache.REEF.Wake.Remote.Impl;
 
 namespace Org.Apache.REEF.Wake.Remote
 {
+    [Obsolete("Deprecated in 0.14, please inject the ICodec directly or use 
its constructor instead.")]
     [DefaultImplementation(typeof(ByteCodecFactory))]
     public interface ICodecFactory
     {

http://git-wip-us.apache.org/repos/asf/reef/blob/ad896d19/lang/cs/Org.Apache.REEF.Wake/Remote/IDecoder.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/IDecoder.cs 
b/lang/cs/Org.Apache.REEF.Wake/Remote/IDecoder.cs
index 850e788..812469b 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/IDecoder.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/IDecoder.cs
@@ -15,8 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
+using System;
+
 namespace Org.Apache.REEF.Wake.Remote
 {
+    [Obsolete("Deprecated in 0.14, please use ICodec<T> instead.")]
     public interface IDecoder
     {
     }

http://git-wip-us.apache.org/repos/asf/reef/blob/ad896d19/lang/cs/Org.Apache.REEF.Wake/Remote/IEncoder.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/IEncoder.cs 
b/lang/cs/Org.Apache.REEF.Wake/Remote/IEncoder.cs
index ad0c183..92daea7 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/IEncoder.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/IEncoder.cs
@@ -15,8 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
+using System;
+
 namespace Org.Apache.REEF.Wake.Remote
 {
+    [Obsolete("Deprecated in 0.14, please use IEncoder<T> instead.")]
     public interface IEncoder
     {
     }

http://git-wip-us.apache.org/repos/asf/reef/blob/ad896d19/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodecFactory.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodecFactory.cs 
b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodecFactory.cs
index 1f81955..a57f341 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodecFactory.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodecFactory.cs
@@ -15,10 +15,12 @@
 // specific language governing permissions and limitations
 // under the License.
 
+using System;
 using Org.Apache.REEF.Tang.Annotations;
 
 namespace Org.Apache.REEF.Wake.Remote.Impl
 {
+    [Obsolete("Deprecated in 0.14, please inject or call ByteCodec's 
constructor instead.")]
     public sealed class ByteCodecFactory : ICodecFactory
     {
         [Inject]

http://git-wip-us.apache.org/repos/asf/reef/blob/ad896d19/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiCodec.cs 
b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiCodec.cs
index 325adf0..1895fba 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiCodec.cs
@@ -15,6 +15,8 @@
 // specific language governing permissions and limitations
 // under the License.
 
+using Org.Apache.REEF.Tang.Annotations;
+
 namespace Org.Apache.REEF.Wake.Remote.Impl
 {
     /// <summary>
@@ -29,6 +31,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
         /// <summary>
         /// Constructs a new MultiCodec object.
         /// </summary>
+        [Inject]
         public MultiCodec()
         {
             _encoder = new MultiEncoder<T>();

Reply via email to