Repository: reef Updated Branches: refs/heads/master 3220f9bce -> 4190a6c55
[REEF-1098] Pass through O.A.R.Wake to hide unnecessarily public APIs JIRA: [REEF-1098](https://issues.apache.org/jira/browse/REEF-1098) Pull Request: This closes #771 Project: http://git-wip-us.apache.org/repos/asf/reef/repo Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/4190a6c5 Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/4190a6c5 Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/4190a6c5 Branch: refs/heads/master Commit: 4190a6c55ebbe8ea3093903d8b294d665452a699 Parents: 3220f9b Author: Andrew Chung <[email protected]> Authored: Thu Jan 14 16:50:55 2016 -0800 Committer: Dongjoon Hyun <[email protected]> Committed: Fri Jan 15 13:16:07 2016 -0800 ---------------------------------------------------------------------- .../Impl/LoggingEventHandler.cs | 2 +- .../Impl/MissingStartHandlerHandler.cs | 5 +- .../Org.Apache.REEF.Wake/Impl/PeriodicEvent.cs | 2 +- .../Impl/SingleThreadStage.cs | 51 ++++++++++---------- lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs | 2 +- .../Org.Apache.REEF.Wake.csproj | 12 ++--- .../RX/Impl/RxTimerStage.cs | 2 +- .../RX/ObserverCompletedException.cs | 2 +- .../Remote/Impl/ByteCodec.cs | 2 +- .../Remote/Impl/ByteCodecFactory.cs | 2 +- .../Org.Apache.REEF.Wake/Remote/Impl/Channel.cs | 2 +- .../Remote/Impl/DefaultRemoteMessage.cs | 2 +- .../Remote/Impl/IPEndpointComparer.cs | 2 +- .../Remote/Impl/IntCodec.cs | 2 +- .../Remote/Impl/ObserverContainer.cs | 2 +- .../Remote/Impl/RemoteEventCodec.cs | 2 +- .../Remote/Impl/SocketRemoteIdentifier.cs | 2 +- .../Remote/Impl/StreamDataReader.cs | 2 +- .../Remote/Impl/StreamDataWriter.cs | 2 +- .../Remote/Impl/StringCodec.cs | 2 +- .../Remote/Impl/StringIdentifier.cs | 2 +- .../Remote/Impl/StringIdentifierFactory.cs | 2 +- .../Remote/Parameters/TcpPortRangeCount.cs | 5 +- .../Remote/Parameters/TcpPortRangeSeed.cs | 2 +- .../Remote/Parameters/TcpPortRangeStart.cs | 2 +- .../Remote/Parameters/TcpPortRangeTryCount.cs | 2 +- .../Remote/RemoteConfiguration.cs | 2 +- .../Remote/RemoteRuntimeException.cs | 2 +- .../Remote/TcpPortProvider.cs | 4 +- .../Time/Event/StartTime.cs | 2 +- .../Org.Apache.REEF.Wake/Time/Event/StopTime.cs | 2 +- .../Time/Runtime/Event/ClientAlarm.cs | 2 +- .../Time/Runtime/Event/IdleClock.cs | 2 +- .../Time/Runtime/Event/RuntimeAlarm.cs | 2 +- .../Time/Runtime/Event/RuntimeStart.cs | 2 +- .../Time/Runtime/Event/RuntimeStop.cs | 2 +- .../Time/Runtime/LogicalTimer.cs | 4 +- .../Time/Runtime/RealTimer.cs | 4 +- .../Time/Runtime/RuntimeClock.cs | 4 +- lang/cs/Org.Apache.REEF.Wake/Time/Time.cs | 2 +- lang/cs/Org.Apache.REEF.Wake/Util/Actionable.cs | 2 +- lang/cs/Org.Apache.REEF.Wake/Util/Disposable.cs | 2 +- .../Util/FixedThreadPoolTaskService.cs | 2 +- .../LimitedConcurrencyLevelTaskScheduler.cs | 2 +- .../Org.Apache.REEF.Wake/Util/NetworkUtils.cs | 2 +- .../Util/SerializationHelper.cs | 2 +- lang/cs/Org.Apache.REEF.Wake/Util/TimeHelper.cs | 2 +- .../WakeRuntimeException.cs | 2 +- 48 files changed, 80 insertions(+), 89 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Impl/LoggingEventHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Impl/LoggingEventHandler.cs b/lang/cs/Org.Apache.REEF.Wake/Impl/LoggingEventHandler.cs index ef74db6..f0c0d97 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Impl/LoggingEventHandler.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Impl/LoggingEventHandler.cs @@ -29,7 +29,7 @@ namespace Org.Apache.REEF.Wake.Impl private static readonly Logger LOGGER = Logger.GetLogger(typeof(T)); [Inject] - public LoggingEventHandler() + private LoggingEventHandler() { } http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Impl/MissingStartHandlerHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Impl/MissingStartHandlerHandler.cs b/lang/cs/Org.Apache.REEF.Wake/Impl/MissingStartHandlerHandler.cs index 57416e5..f145bba 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Impl/MissingStartHandlerHandler.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Impl/MissingStartHandlerHandler.cs @@ -23,17 +23,16 @@ using Org.Apache.REEF.Wake.Time.Event; namespace Org.Apache.REEF.Wake.Impl { - public class MissingStartHandlerHandler : IObserver<StartTime> + public sealed class MissingStartHandlerHandler : IObserver<StartTime> { [Inject] - public MissingStartHandlerHandler() + private MissingStartHandlerHandler() { } public void OnNext(StartTime value) { // Do nothing, since we only use this for evaluator, not for driver. - // LOGGER.Log(Level.Info, "No binding to Clock.StartHandler. It is likely that the clock will immediately go idle and close."); } public void OnError(Exception error) http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Impl/PeriodicEvent.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Impl/PeriodicEvent.cs b/lang/cs/Org.Apache.REEF.Wake/Impl/PeriodicEvent.cs index 543d342..ccba0f9 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Impl/PeriodicEvent.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Impl/PeriodicEvent.cs @@ -20,7 +20,7 @@ namespace Org.Apache.REEF.Wake.Impl { /// <summary>Periodic event for timers</summary> - public class PeriodicEvent + public sealed class PeriodicEvent { } } http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Impl/SingleThreadStage.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Impl/SingleThreadStage.cs b/lang/cs/Org.Apache.REEF.Wake/Impl/SingleThreadStage.cs index e27f67e..6e04944 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Impl/SingleThreadStage.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Impl/SingleThreadStage.cs @@ -36,7 +36,7 @@ namespace Org.Apache.REEF.Wake.Impl { queue = new BlockingCollection<T>(capacity); interrupted = false; - thread = new Thread(new ThreadStart(new Producer<T>(queue, handler, interrupted).Run)); + thread = new Thread(new Producer(queue, handler, interrupted).Run); thread.Start(); } @@ -59,39 +59,38 @@ namespace Org.Apache.REEF.Wake.Impl interrupted = true; thread.Interrupt(); } - } - /// <summary>Takes events from the queue and provides them to the handler</summary> - /// <typeparam name="T">The type</typeparam> - internal class Producer<T> - { - private readonly BlockingCollection<T> _queue; + /// <summary>Takes events from the queue and provides them to the handler</summary> + private sealed class Producer + { + private readonly BlockingCollection<T> _queue; - private readonly IEventHandler<T> _handler; + private readonly IEventHandler<T> _handler; - private volatile bool _interrupted; + private volatile bool _interrupted; - internal Producer(BlockingCollection<T> queue, IEventHandler<T> handler, bool interrupted) - { - _queue = queue; - _handler = handler; - _interrupted = interrupted; - } + internal Producer(BlockingCollection<T> queue, IEventHandler<T> handler, bool interrupted) + { + _queue = queue; + _handler = handler; + _interrupted = interrupted; + } - public void Run() - { - while (true) + public void Run() { - try - { - T value = _queue.Take(); - _handler.OnNext(value); - } - catch (Exception) + while (true) { - if (_interrupted) + try + { + T value = _queue.Take(); + _handler.OnNext(value); + } + catch (Exception) { - break; + if (_interrupted) + { + break; + } } } } http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs b/lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs index 75e1eac..a9fc85c 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Impl/TimerStage.cs @@ -22,7 +22,7 @@ using System.Timers; namespace Org.Apache.REEF.Wake.Impl { /// <summary>Stage that triggers an event handler periodically</summary> - public class TimerStage : IStage + public sealed class TimerStage : IStage { // private readonly ScheduledExecutorService executor; private readonly Timer _timer; http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj b/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj index 9e2098b..6ce25d3 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj +++ b/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj @@ -53,7 +53,6 @@ under the License. <Compile Include="Remote\Impl\DefaultRemoteManagerFactory.cs" /> <Compile Include="Impl\LoggingEventHandler.cs" /> <Compile Include="Impl\MissingStartHandlerHandler.cs" /> - <Compile Include="Impl\MultiEventHandler.cs" /> <Compile Include="Impl\PeriodicEvent.cs" /> <Compile Include="Impl\PubSubEventHandler.cs" /> <Compile Include="Impl\SingleThreadStage.cs" /> @@ -78,7 +77,7 @@ under the License. <Compile Include="Remote\Impl\StreamingTransportServer.cs" /> <Compile Include="Remote\IRemoteManagerFactory.cs" /> <Compile Include="Remote\Proto\WakeRemoteProtosGen.cs"> - <ExcludeFromStyleCop>true</ExcludeFromStyleCop> + <ExcludeFromStyleCop>true</ExcludeFromStyleCop> </Compile> <Compile Include="Remote\ICodec.cs" /> <Compile Include="Remote\ICodecFactory.cs" /> @@ -170,12 +169,7 @@ under the License. <None Include="packages.config" /> <None Include="Remote\Proto\RemoteProtocol.proto" /> </ItemGroup> - <ItemGroup> - <Folder Include="Proto\" /> - <Folder Include="Time\Time\Event\" /> - <Folder Include="Time\Time\Runtime\Event\" /> - <Folder Include="Util\Util\" /> - </ItemGroup> + <ItemGroup /> <ItemGroup> <ProjectReference Include="$(SolutionDir)\Org.Apache.REEF.Tang\Org.Apache.REEF.Tang.csproj"> <Project>{97dbb573-3994-417a-9f69-ffa25f00d2a6}</Project> @@ -196,4 +190,4 @@ under the License. <Target Name="AfterBuild"> </Target> --> -</Project> +</Project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/RX/Impl/RxTimerStage.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/RX/Impl/RxTimerStage.cs b/lang/cs/Org.Apache.REEF.Wake/RX/Impl/RxTimerStage.cs index 7389ded..0b9b8c7 100644 --- a/lang/cs/Org.Apache.REEF.Wake/RX/Impl/RxTimerStage.cs +++ b/lang/cs/Org.Apache.REEF.Wake/RX/Impl/RxTimerStage.cs @@ -24,7 +24,7 @@ using Org.Apache.REEF.Wake.Impl; namespace Org.Apache.REEF.Wake.RX.Impl { /// <summary>Timer stage that provides events to the observer periodically</summary> - public class RxTimerStage : IStage, IStaticObservable + public sealed class RxTimerStage : IStage, IStaticObservable { private readonly Timer _timer; private readonly PeriodicEvent _value = new PeriodicEvent(); http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/RX/ObserverCompletedException.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/RX/ObserverCompletedException.cs b/lang/cs/Org.Apache.REEF.Wake/RX/ObserverCompletedException.cs index e620a7c..4eb85c2 100644 --- a/lang/cs/Org.Apache.REEF.Wake/RX/ObserverCompletedException.cs +++ b/lang/cs/Org.Apache.REEF.Wake/RX/ObserverCompletedException.cs @@ -39,7 +39,7 @@ namespace Org.Apache.REEF.Wake.RX /// entirely. /// </remarks> [System.Serializable] - public class ObserverCompletedException : InvalidOperationException + public sealed class ObserverCompletedException : InvalidOperationException { private const long serialVersionUID = 1L; } http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodec.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodec.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodec.cs index 8584c67..e86a201 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodec.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodec.cs @@ -21,7 +21,7 @@ using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Wake.Remote.Impl { - public class ByteCodec : ICodec<byte[]> + public sealed class ByteCodec : ICodec<byte[]> { [Inject] public ByteCodec() http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/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 8e33bdb..c4968a0 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodecFactory.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ByteCodecFactory.cs @@ -21,7 +21,7 @@ using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Wake.Remote.Impl { - public class ByteCodecFactory : ICodecFactory + public sealed class ByteCodecFactory : ICodecFactory { [Inject] public ByteCodecFactory() http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/Channel.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/Channel.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/Channel.cs index dea6233..4e55fe2 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/Channel.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/Channel.cs @@ -27,7 +27,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl /// <summary> /// Performs low level network IO operations between hosts /// </summary> - public class Channel + public sealed class Channel { private readonly NetworkStream _stream; http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/DefaultRemoteMessage.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/DefaultRemoteMessage.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/DefaultRemoteMessage.cs index 2b8c214..a20b5c6 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/DefaultRemoteMessage.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/DefaultRemoteMessage.cs @@ -19,7 +19,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl { - internal class DefaultRemoteMessage<T> : IRemoteMessage<T> + internal sealed class DefaultRemoteMessage<T> : IRemoteMessage<T> { public DefaultRemoteMessage(IRemoteIdentifier id, T message) { http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/IPEndpointComparer.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/IPEndpointComparer.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/IPEndpointComparer.cs index d2c5231..fe5e839 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/IPEndpointComparer.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/IPEndpointComparer.cs @@ -25,7 +25,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl /// <summary> /// Class to compare two IPEndPoint objects. /// </summary> - internal class IPEndPointComparer : IEqualityComparer<IPEndPoint> + internal sealed class IPEndPointComparer : IEqualityComparer<IPEndPoint> { public bool Equals(IPEndPoint x, IPEndPoint y) { http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/IntCodec.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/IntCodec.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/IntCodec.cs index ab1bb0b..685dcc2 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/IntCodec.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/IntCodec.cs @@ -22,7 +22,7 @@ using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Wake.Remote.Impl { - public class IntCodec : ICodec<int> + public sealed class IntCodec : ICodec<int> { [Inject] public IntCodec() http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ObserverContainer.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ObserverContainer.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ObserverContainer.cs index d083dee..165d732 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ObserverContainer.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/ObserverContainer.cs @@ -28,7 +28,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl /// Stores registered IObservers for DefaultRemoteManager. /// Can register and look up IObservers by remote IPEndPoint. /// </summary> - internal class ObserverContainer<T> : IObserver<TransportEvent<IRemoteEvent<T>>> + internal sealed class ObserverContainer<T> : IObserver<TransportEvent<IRemoteEvent<T>>> { private readonly ConcurrentDictionary<IPEndPoint, IObserver<T>> _endpointMap; private readonly ConcurrentDictionary<Type, IObserver<IRemoteMessage<T>>> _typeMap; http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteEventCodec.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteEventCodec.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteEventCodec.cs index bcc5730..bda218f 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteEventCodec.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteEventCodec.cs @@ -19,7 +19,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl { - internal class RemoteEventCodec<T> : ICodec<IRemoteEvent<T>> + internal sealed class RemoteEventCodec<T> : ICodec<IRemoteEvent<T>> { private readonly RemoteEventEncoder<T> _encoder; private readonly RemoteEventDecoder<T> _decoder; http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/SocketRemoteIdentifier.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/SocketRemoteIdentifier.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/SocketRemoteIdentifier.cs index 6b19782..13adf35 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/SocketRemoteIdentifier.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/SocketRemoteIdentifier.cs @@ -28,7 +28,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl /// <summary> /// Remote identifier based on a socket address /// </summary> - public class SocketRemoteIdentifier : IRemoteIdentifier + public sealed class SocketRemoteIdentifier : IRemoteIdentifier { private static readonly Logger LOGGER = Logger.GetLogger(typeof(SocketRemoteIdentifier)); private readonly IPEndPoint _addr; http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs index 26ff848..28fc5ad 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataReader.cs @@ -29,7 +29,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl /// <summary> /// Class with functions to Read from stream /// </summary> - public class StreamDataReader : IDataReader + public sealed class StreamDataReader : IDataReader { private static readonly Logger Logger = Logger.GetLogger(typeof(StreamDataReader)); http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataWriter.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataWriter.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataWriter.cs index 976253b..e3f812f 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataWriter.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamDataWriter.cs @@ -24,7 +24,7 @@ using System.Threading.Tasks; namespace Org.Apache.REEF.Wake.Remote.Impl { - public class StreamDataWriter : IDataWriter + public sealed class StreamDataWriter : IDataWriter { /// <summary> /// Stream to which to write http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringCodec.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringCodec.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringCodec.cs index ec67ebd..5c31a0b 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringCodec.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringCodec.cs @@ -22,7 +22,7 @@ using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Wake.Remote.Impl { - public class StringCodec : ICodec<string> + public sealed class StringCodec : ICodec<string> { [Inject] public StringCodec() http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringIdentifier.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringIdentifier.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringIdentifier.cs index 012647b..ccf47eb 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringIdentifier.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringIdentifier.cs @@ -19,7 +19,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl { - public class StringIdentifier : IIdentifier + public sealed class StringIdentifier : IIdentifier { private readonly string _str; http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringIdentifierFactory.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringIdentifierFactory.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringIdentifierFactory.cs index dcf6ec8..d4cbd89 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringIdentifierFactory.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StringIdentifierFactory.cs @@ -21,7 +21,7 @@ using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Wake.Remote.Impl { - public class StringIdentifierFactory : IIdentifierFactory + public sealed class StringIdentifierFactory : IIdentifierFactory { [Inject] public StringIdentifierFactory() http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeCount.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeCount.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeCount.cs index 164e2bd..709a24b 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeCount.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeCount.cs @@ -21,9 +21,8 @@ using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Wake.Remote.Parameters { - [NamedParameter(Documentation = "Port number count in the range for listening on tcp ports", DefaultValue = "1000") - ] - public class TcpPortRangeCount : Name<int> + [NamedParameter(Documentation = "Port number count in the range for listening on tcp ports", DefaultValue = "1000")] + public sealed class TcpPortRangeCount : Name<int> { } } http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeSeed.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeSeed.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeSeed.cs index a433c36..ea62e3f 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeSeed.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeSeed.cs @@ -22,7 +22,7 @@ using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Wake.Remote.Parameters { [NamedParameter(Documentation = "Seed for the random port number generator", DefaultValue = "0")] - public class TcpPortRangeSeed : Name<int> + public sealed class TcpPortRangeSeed : Name<int> { } } http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeStart.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeStart.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeStart.cs index 57a3b72..fab4310 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeStart.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeStart.cs @@ -22,7 +22,7 @@ using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Wake.Remote.Parameters { [NamedParameter(Documentation = "Port number range start for listening on tcp ports", DefaultValue = "8900")] - public class TcpPortRangeStart : Name<int> + public sealed class TcpPortRangeStart : Name<int> { } } http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeTryCount.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeTryCount.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeTryCount.cs index b740f9b..d12964b 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeTryCount.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Parameters/TcpPortRangeTryCount.cs @@ -22,7 +22,7 @@ using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Wake.Remote.Parameters { [NamedParameter(Documentation = "Count of tries to get a tcp port in the port range", DefaultValue = "1000")] - public class TcpPortRangeTryCount : Name<int> + public sealed class TcpPortRangeTryCount : Name<int> { } } http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/RemoteConfiguration.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/RemoteConfiguration.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/RemoteConfiguration.cs index bc6c2b2..11cebaf 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/RemoteConfiguration.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/RemoteConfiguration.cs @@ -22,7 +22,7 @@ using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Wake.Remote { - public class RemoteConfiguration + public sealed class RemoteConfiguration { [NamedParameter(shortName: "rm_name", documentation: "The name of the remote manager.")] public class ManagerName : Name<string> http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/RemoteRuntimeException.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/RemoteRuntimeException.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/RemoteRuntimeException.cs index 150e5c8..430d9b2 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/RemoteRuntimeException.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/RemoteRuntimeException.cs @@ -23,7 +23,7 @@ namespace Org.Apache.REEF.Wake.Remote { /// <summary>Wake remote runtime exception</summary> [System.Serializable] - public class RemoteRuntimeException : Exception + public sealed class RemoteRuntimeException : Exception { private const long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Remote/TcpPortProvider.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/TcpPortProvider.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/TcpPortProvider.cs index 04061a5..d192a1a 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Remote/TcpPortProvider.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Remote/TcpPortProvider.cs @@ -27,7 +27,7 @@ using Org.Apache.REEF.Wake.Remote.Parameters; namespace Org.Apache.REEF.Wake.Remote { - public class TcpPortProvider : ITcpPortProvider + public sealed class TcpPortProvider : ITcpPortProvider { private readonly int _tcpPortRangeStart; private readonly int _tcpPortRangeCount; @@ -35,7 +35,7 @@ namespace Org.Apache.REEF.Wake.Remote private readonly int _tcpPortRangeSeed; [Inject] - internal TcpPortProvider( + private TcpPortProvider( [Parameter(typeof(TcpPortRangeStart))] int tcpPortRangeStart, [Parameter(typeof(TcpPortRangeCount))] int tcpPortRangeCount, [Parameter(typeof(TcpPortRangeTryCount))] int tcpPortRangeTryCount, http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Time/Event/StartTime.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Event/StartTime.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Event/StartTime.cs index abe6eab..bcb2b27 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Time/Event/StartTime.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Time/Event/StartTime.cs @@ -22,7 +22,7 @@ namespace Org.Apache.REEF.Wake.Time.Event /// <summary> /// Represents the Time at which a component started. /// </summary> - public class StartTime : Time + public sealed class StartTime : Time { public StartTime(long timeStamp) : base(timeStamp) { http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Time/Event/StopTime.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Event/StopTime.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Event/StopTime.cs index a97e682..dd66a1f 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Time/Event/StopTime.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Time/Event/StopTime.cs @@ -22,7 +22,7 @@ namespace Org.Apache.REEF.Wake.Time.Event /// <summary> /// Represents the Time at which a component stops. /// </summary> - public class StopTime : Time + public sealed class StopTime : Time { public StopTime(long timeStamp) : base(timeStamp) { http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/ClientAlarm.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/ClientAlarm.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/ClientAlarm.cs index 569e421..54d6a54 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/ClientAlarm.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/ClientAlarm.cs @@ -22,7 +22,7 @@ using Org.Apache.REEF.Wake.Time.Event; namespace Org.Apache.REEF.Wake.Time.Runtime.Event { - public class ClientAlarm : Alarm + public sealed class ClientAlarm : Alarm { public ClientAlarm(long timestamp, IObserver<Alarm> handler) : base(timestamp, handler) { http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/IdleClock.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/IdleClock.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/IdleClock.cs index ff9872d..d2b3df1 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/IdleClock.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/IdleClock.cs @@ -19,7 +19,7 @@ namespace Org.Apache.REEF.Wake.Time.Runtime.Event { - public class IdleClock : Time + public sealed class IdleClock : Time { public IdleClock(long timestamp) : base(timestamp) { http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeAlarm.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeAlarm.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeAlarm.cs index aaffd32..81526bd 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeAlarm.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeAlarm.cs @@ -22,7 +22,7 @@ using Org.Apache.REEF.Wake.Time.Event; namespace Org.Apache.REEF.Wake.Time.Runtime.Event { - public class RuntimeAlarm : Alarm + public sealed class RuntimeAlarm : Alarm { public RuntimeAlarm(long timestamp, IObserver<Alarm> handler) : base(timestamp, handler) { http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeStart.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeStart.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeStart.cs index 136d62d..5bda690 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeStart.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeStart.cs @@ -19,7 +19,7 @@ namespace Org.Apache.REEF.Wake.Time.Runtime.Event { - public class RuntimeStart : Time + public sealed class RuntimeStart : Time { public RuntimeStart(long timeStamp) : base(timeStamp) { http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeStop.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeStop.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeStop.cs index 75cc41b..4d49c34 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeStop.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/Event/RuntimeStop.cs @@ -21,7 +21,7 @@ using System; namespace Org.Apache.REEF.Wake.Time.Runtime.Event { - public class RuntimeStop : Time + public sealed class RuntimeStop : Time { public RuntimeStop(long timestamp) : this(timestamp, null) { http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/LogicalTimer.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/LogicalTimer.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/LogicalTimer.cs index c118ace..b61b53d 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/LogicalTimer.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/LogicalTimer.cs @@ -24,10 +24,10 @@ namespace Org.Apache.REEF.Wake.Time.Runtime /// <summary> /// LogicalTimer class used for testing purposes. /// </summary> - public class LogicalTimer : ITimer + public sealed class LogicalTimer : ITimer { [Inject] - public LogicalTimer() + private LogicalTimer() { } http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RealTimer.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RealTimer.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RealTimer.cs index a9688d5..53c26ee 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RealTimer.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RealTimer.cs @@ -22,10 +22,10 @@ using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Wake.Time.Runtime { - public class RealTimer : ITimer + public sealed class RealTimer : ITimer { [Inject] - public RealTimer() + private RealTimer() { } http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs index a9716fc..08a9f87 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Time/Runtime/RuntimeClock.cs @@ -31,7 +31,7 @@ using Org.Apache.REEF.Wake.Time.Runtime.Event; namespace Org.Apache.REEF.Wake.Time.Runtime { - public class RuntimeClock : IClock + public sealed class RuntimeClock : IClock { private static readonly Logger LOGGER = Logger.GetLogger(typeof(RuntimeClock)); @@ -57,7 +57,7 @@ namespace Org.Apache.REEF.Wake.Time.Runtime /// <param name="runtimeStopHandler">The runtime stop handler</param> /// <param name="idleHandler">The idle handler</param> [Inject] - internal RuntimeClock( + private RuntimeClock( ITimer timer, [Parameter(typeof(StartHandler))] IInjectionFuture<ISet<IObserver<StartTime>>> startHandler, [Parameter(typeof(StopHandler))] IInjectionFuture<ISet<IObserver<StopTime>>> stopHandler, http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Time/Time.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Time/Time.cs b/lang/cs/Org.Apache.REEF.Wake/Time/Time.cs index 16d3d57..e053e0f 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Time/Time.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Time/Time.cs @@ -27,7 +27,7 @@ namespace Org.Apache.REEF.Wake.Time /// </summary> public abstract class Time : IComparable<Time> { - public Time(long timeStamp) + protected Time(long timeStamp) { TimeStamp = timeStamp; } http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Util/Actionable.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Util/Actionable.cs b/lang/cs/Org.Apache.REEF.Wake/Util/Actionable.cs index ff16af9..cfb4159 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Util/Actionable.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Util/Actionable.cs @@ -21,7 +21,7 @@ using System.Threading; namespace Org.Apache.REEF.Wake.Util { - public class Actionable + public sealed class Actionable { private readonly ThreadStart _threadStart; http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Util/Disposable.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Util/Disposable.cs b/lang/cs/Org.Apache.REEF.Wake/Util/Disposable.cs index 82ebcc7..944865d 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Util/Disposable.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Util/Disposable.cs @@ -24,7 +24,7 @@ namespace Org.Apache.REEF.Wake.Util /// <summary> /// Generates IDisposables from a factory method /// </summary> - internal class Disposable : IDisposable + internal sealed class Disposable : IDisposable { private readonly Action _disposeFunction; private readonly bool _disposed; http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Util/FixedThreadPoolTaskService.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Util/FixedThreadPoolTaskService.cs b/lang/cs/Org.Apache.REEF.Wake/Util/FixedThreadPoolTaskService.cs index a79d543..7560dcd 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Util/FixedThreadPoolTaskService.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Util/FixedThreadPoolTaskService.cs @@ -26,7 +26,7 @@ using Org.Apache.REEF.Utilities.Logging; namespace Org.Apache.REEF.Wake.Util { - public class FixedThreadPoolTaskService : ITaskService + public sealed class FixedThreadPoolTaskService : ITaskService { private static readonly Logger LOGGER = Logger.GetLogger(typeof(FixedThreadPoolTaskService)); http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Util/LimitedConcurrencyLevelTaskScheduler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Util/LimitedConcurrencyLevelTaskScheduler.cs b/lang/cs/Org.Apache.REEF.Wake/Util/LimitedConcurrencyLevelTaskScheduler.cs index 48e9c42..c4fe993 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Util/LimitedConcurrencyLevelTaskScheduler.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Util/LimitedConcurrencyLevelTaskScheduler.cs @@ -27,7 +27,7 @@ using Org.Apache.REEF.Utilities.Logging; namespace Org.Apache.REEF.Wake.Util { - internal class LimitedConcurrencyLevelTaskScheduler : TaskScheduler + internal sealed class LimitedConcurrencyLevelTaskScheduler : TaskScheduler { private static readonly Logger LOGGER = Logger.GetLogger(typeof(LimitedConcurrencyLevelTaskScheduler)); http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Util/NetworkUtils.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Util/NetworkUtils.cs b/lang/cs/Org.Apache.REEF.Wake/Util/NetworkUtils.cs index f1fb45a..612b545 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Util/NetworkUtils.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Util/NetworkUtils.cs @@ -24,7 +24,7 @@ using System.Net.Sockets; namespace Org.Apache.REEF.Wake.Util { - public class NetworkUtils + public static class NetworkUtils { private static IPAddress _localAddress; private static readonly Random _random = new Random(); http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Util/SerializationHelper.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Util/SerializationHelper.cs b/lang/cs/Org.Apache.REEF.Wake/Util/SerializationHelper.cs index 2bb730f..52cf0e4 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Util/SerializationHelper.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Util/SerializationHelper.cs @@ -22,7 +22,7 @@ using ProtoBuf; namespace Org.Apache.REEF.Wake.Util { - public class SerializationHelper + public static class SerializationHelper { public static byte[] Serialize<T>(T t) { http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/Util/TimeHelper.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/Util/TimeHelper.cs b/lang/cs/Org.Apache.REEF.Wake/Util/TimeHelper.cs index 2ac374e..41e5ee1 100644 --- a/lang/cs/Org.Apache.REEF.Wake/Util/TimeHelper.cs +++ b/lang/cs/Org.Apache.REEF.Wake/Util/TimeHelper.cs @@ -21,7 +21,7 @@ using System; namespace Org.Apache.REEF.Wake.Util { - public class TimeHelper + public static class TimeHelper { public const long TicksPerMilliSecond = 10000; public const long TicksPerMicroSecond = 10; http://git-wip-us.apache.org/repos/asf/reef/blob/4190a6c5/lang/cs/Org.Apache.REEF.Wake/WakeRuntimeException.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Wake/WakeRuntimeException.cs b/lang/cs/Org.Apache.REEF.Wake/WakeRuntimeException.cs index 2e21a60..61c386d 100644 --- a/lang/cs/Org.Apache.REEF.Wake/WakeRuntimeException.cs +++ b/lang/cs/Org.Apache.REEF.Wake/WakeRuntimeException.cs @@ -23,7 +23,7 @@ namespace Org.Apache.REEF.Wake { /// <summary>Wake runtime exception</summary> [System.Serializable] - public class WakeRuntimeException : Exception + public sealed class WakeRuntimeException : Exception { private const long serialVersionUID = 1L;
