Repository: reef Updated Branches: refs/heads/master b73c22295 -> 81090b636
[REEF-1082] Create C# Attributes that Parallel Java Annotations This addressed the issue by: * Added new attributes. * Moved attributes from Common to Utilities. JIRA: [REEF-1082](https://issues.apache.org/jira/browse/REEF-1082) Pull Request: This closes #733 Project: http://git-wip-us.apache.org/repos/asf/reef/repo Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/81090b63 Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/81090b63 Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/81090b63 Branch: refs/heads/master Commit: 81090b636a401c4e8c70c3da075ba2b688eabbf8 Parents: b73c222 Author: Andrew Chung <[email protected]> Authored: Tue Dec 15 11:26:52 2015 -0800 Committer: Markus Weimer <[email protected]> Committed: Tue Dec 15 17:34:30 2015 -0800 ---------------------------------------------------------------------- .../Org.Apache.REEF.Client/API/IREEFClient.cs | 2 +- .../API/TcpPortConfigurationModule.cs | 2 +- .../Common/IJobSubmissionResult.cs | 2 +- .../Org.Apache.REEF.Client/Local/LocalClient.cs | 2 +- .../Attributes/UnstableAttribute.cs | 57 -------------------- .../Files/REEFFileNames.cs | 2 +- .../Org.Apache.REEF.Common.csproj | 1 - lang/cs/Org.Apache.REEF.IMRU/API/IIMRUClient.cs | 2 +- .../API/IIMRUResultHandler.cs | 2 +- .../ResultHandler/DefaultResultHandler.cs | 2 +- .../OnREEF/ResultHandler/WriteResultHandler.cs | 2 +- .../Attributes/ClientSideAttribute.cs | 30 +++++++++++ .../Attributes/DriverSideAttribute.cs | 30 +++++++++++ .../Attributes/EvaluatorSideAttribute.cs | 30 +++++++++++ .../Attributes/InteropAttribute.cs | 48 +++++++++++++++++ .../Attributes/PrivateAttribute.cs | 31 +++++++++++ .../Attributes/TaskSideAttribute.cs | 30 +++++++++++ .../Attributes/UnstableAttribute.cs | 57 ++++++++++++++++++++ .../Org.Apache.Reef.Utilities.csproj | 9 +++- 19 files changed, 273 insertions(+), 68 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Client/API/IREEFClient.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Client/API/IREEFClient.cs b/lang/cs/Org.Apache.REEF.Client/API/IREEFClient.cs index 25211d2..010c9e2 100644 --- a/lang/cs/Org.Apache.REEF.Client/API/IREEFClient.cs +++ b/lang/cs/Org.Apache.REEF.Client/API/IREEFClient.cs @@ -21,7 +21,7 @@ using System; using System.Threading.Tasks; using Org.Apache.REEF.Client.Common; using Org.Apache.REEF.Client.YARN.RestClient.DataModel; -using Org.Apache.REEF.Common.Attributes; +using Org.Apache.REEF.Utilities.Attributes; namespace Org.Apache.REEF.Client.API { http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Client/API/TcpPortConfigurationModule.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Client/API/TcpPortConfigurationModule.cs b/lang/cs/Org.Apache.REEF.Client/API/TcpPortConfigurationModule.cs index affe511..46b1fd8 100644 --- a/lang/cs/Org.Apache.REEF.Client/API/TcpPortConfigurationModule.cs +++ b/lang/cs/Org.Apache.REEF.Client/API/TcpPortConfigurationModule.cs @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -using Org.Apache.REEF.Common.Attributes; using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Common.Client.Parameters; using Org.Apache.REEF.Tang.Formats; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Util; +using Org.Apache.REEF.Utilities.Attributes; using Org.Apache.REEF.Wake.Remote.Parameters; namespace Org.Apache.REEF.Client.API http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Client/Common/IJobSubmissionResult.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Client/Common/IJobSubmissionResult.cs b/lang/cs/Org.Apache.REEF.Client/Common/IJobSubmissionResult.cs index 6ecdbb4..b6f9767 100644 --- a/lang/cs/Org.Apache.REEF.Client/Common/IJobSubmissionResult.cs +++ b/lang/cs/Org.Apache.REEF.Client/Common/IJobSubmissionResult.cs @@ -18,7 +18,7 @@ */ using Org.Apache.REEF.Client.YARN.RestClient.DataModel; -using Org.Apache.REEF.Common.Attributes; +using Org.Apache.REEF.Utilities.Attributes; namespace Org.Apache.REEF.Client.Common { http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Client/Local/LocalClient.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Client/Local/LocalClient.cs b/lang/cs/Org.Apache.REEF.Client/Local/LocalClient.cs index 2c54259..cb05e14 100644 --- a/lang/cs/Org.Apache.REEF.Client/Local/LocalClient.cs +++ b/lang/cs/Org.Apache.REEF.Client/Local/LocalClient.cs @@ -28,11 +28,11 @@ using Org.Apache.REEF.Client.Avro.Local; using Org.Apache.REEF.Client.Common; using Org.Apache.REEF.Client.Local.Parameters; using Org.Apache.REEF.Client.YARN.RestClient.DataModel; -using Org.Apache.REEF.Common.Attributes; using Org.Apache.REEF.Common.Avro; using Org.Apache.REEF.Common.Files; using Org.Apache.REEF.Tang.Annotations; using Org.Apache.REEF.Tang.Implementations.Tang; +using Org.Apache.REEF.Utilities.Attributes; using Org.Apache.REEF.Utilities.Logging; using Org.Apache.REEF.Wake.Remote.Parameters; http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Common/Attributes/UnstableAttribute.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Common/Attributes/UnstableAttribute.cs b/lang/cs/Org.Apache.REEF.Common/Attributes/UnstableAttribute.cs deleted file mode 100644 index bebf03c..0000000 --- a/lang/cs/Org.Apache.REEF.Common/Attributes/UnstableAttribute.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -using System; - -namespace Org.Apache.REEF.Common.Attributes -{ - /// <summary> - /// Signals that the API is NOT stabilized. - /// </summary> - [AttributeUsage(AttributeTargets.All)] - public sealed class UnstableAttribute : Attribute - { - private readonly string _descriptionOfLikelyChange; - private readonly string _versionIntroduced; - - /// <summary> - /// </summary> - /// <param name="versionIntroduced">The version in which this unstable API was introduced.</param> - /// <param name="descriptionOfLikelyChange">Description of the likely change in the future.</param> - public UnstableAttribute(string versionIntroduced, string descriptionOfLikelyChange = "") - { - _versionIntroduced = versionIntroduced; - _descriptionOfLikelyChange = descriptionOfLikelyChange; - } - - /// <summary> - /// The version in which this unstable API was introduced. - /// </summary> - public string VersionIntroduced - { - get { return _versionIntroduced; } - } - - /// <summary> - /// Description of the likely change in the future. - /// </summary> - public string DescriptionOfLikelyChange - { - get { return _descriptionOfLikelyChange; } - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Common/Files/REEFFileNames.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Common/Files/REEFFileNames.cs b/lang/cs/Org.Apache.REEF.Common/Files/REEFFileNames.cs index 52bd1cc..99d69c6 100644 --- a/lang/cs/Org.Apache.REEF.Common/Files/REEFFileNames.cs +++ b/lang/cs/Org.Apache.REEF.Common/Files/REEFFileNames.cs @@ -19,8 +19,8 @@ using System.Diagnostics.CodeAnalysis; using System.IO; -using Org.Apache.REEF.Common.Attributes; using Org.Apache.REEF.Tang.Annotations; +using Org.Apache.REEF.Utilities.Attributes; namespace Org.Apache.REEF.Common.Files { http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj b/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj index 836a6db..30af205 100644 --- a/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj +++ b/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj @@ -54,7 +54,6 @@ under the License. <Compile Include="Api\AbstractFailure.cs" /> <Compile Include="Api\IAbstractFailure.cs" /> <Compile Include="Api\IFailure.cs" /> - <Compile Include="Attributes\UnstableAttribute.cs" /> <Compile Include="Avro\AvroDriverInfo.cs"> <ExcludeFromStyleCop>true</ExcludeFromStyleCop> </Compile> http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.IMRU/API/IIMRUClient.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.IMRU/API/IIMRUClient.cs b/lang/cs/Org.Apache.REEF.IMRU/API/IIMRUClient.cs index bf8315b..5299d96 100644 --- a/lang/cs/Org.Apache.REEF.IMRU/API/IIMRUClient.cs +++ b/lang/cs/Org.Apache.REEF.IMRU/API/IIMRUClient.cs @@ -19,7 +19,7 @@ using System.Collections.Generic; using Org.Apache.REEF.Client.Common; -using Org.Apache.REEF.Common.Attributes; +using Org.Apache.REEF.Utilities.Attributes; namespace Org.Apache.REEF.IMRU.API { http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.IMRU/API/IIMRUResultHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.IMRU/API/IIMRUResultHandler.cs b/lang/cs/Org.Apache.REEF.IMRU/API/IIMRUResultHandler.cs index c0276c2..55d5e18 100644 --- a/lang/cs/Org.Apache.REEF.IMRU/API/IIMRUResultHandler.cs +++ b/lang/cs/Org.Apache.REEF.IMRU/API/IIMRUResultHandler.cs @@ -18,7 +18,7 @@ */ using System; -using Org.Apache.REEF.Common.Attributes; +using Org.Apache.REEF.Utilities.Attributes; namespace Org.Apache.REEF.IMRU.API { http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/DefaultResultHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/DefaultResultHandler.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/DefaultResultHandler.cs index b694616..ce60b44 100644 --- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/DefaultResultHandler.cs +++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/DefaultResultHandler.cs @@ -18,9 +18,9 @@ */ using System; -using Org.Apache.REEF.Common.Attributes; using Org.Apache.REEF.IMRU.API; using Org.Apache.REEF.Tang.Annotations; +using Org.Apache.REEF.Utilities.Attributes; namespace Org.Apache.REEF.IMRU.OnREEF.ResultHandler { http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs index 5c48bcd..e6c4202 100644 --- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs +++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs @@ -19,10 +19,10 @@ using System; using System.IO; -using Org.Apache.REEF.Common.Attributes; using Org.Apache.REEF.IMRU.API; using Org.Apache.REEF.IO.FileSystem; using Org.Apache.REEF.Tang.Annotations; +using Org.Apache.REEF.Utilities.Attributes; using Org.Apache.REEF.Utilities.Diagnostics; using Org.Apache.REEF.Utilities.Logging; using Org.Apache.REEF.Wake.Remote.Impl; http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Utilities/Attributes/ClientSideAttribute.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Utilities/Attributes/ClientSideAttribute.cs b/lang/cs/Org.Apache.REEF.Utilities/Attributes/ClientSideAttribute.cs new file mode 100644 index 0000000..b82be40 --- /dev/null +++ b/lang/cs/Org.Apache.REEF.Utilities/Attributes/ClientSideAttribute.cs @@ -0,0 +1,30 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +using System; + +namespace Org.Apache.REEF.Utilities.Attributes +{ + /// <summary> + /// Attribute target should be used by REEF Clients. + /// </summary> + [AttributeUsage(AttributeTargets.All)] + public sealed class ClientSideAttribute : Attribute + { + // Intentionally empty. + } +} http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Utilities/Attributes/DriverSideAttribute.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Utilities/Attributes/DriverSideAttribute.cs b/lang/cs/Org.Apache.REEF.Utilities/Attributes/DriverSideAttribute.cs new file mode 100644 index 0000000..57099ce --- /dev/null +++ b/lang/cs/Org.Apache.REEF.Utilities/Attributes/DriverSideAttribute.cs @@ -0,0 +1,30 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +using System; + +namespace Org.Apache.REEF.Utilities.Attributes +{ + /// <summary> + /// Attribute target should be used at the Job Driver. + /// </summary> + [AttributeUsage(AttributeTargets.All)] + public sealed class DriverSideAttribute : Attribute + { + // Intentionally empty. + } +} http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Utilities/Attributes/EvaluatorSideAttribute.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Utilities/Attributes/EvaluatorSideAttribute.cs b/lang/cs/Org.Apache.REEF.Utilities/Attributes/EvaluatorSideAttribute.cs new file mode 100644 index 0000000..65928b7 --- /dev/null +++ b/lang/cs/Org.Apache.REEF.Utilities/Attributes/EvaluatorSideAttribute.cs @@ -0,0 +1,30 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +using System; + +namespace Org.Apache.REEF.Utilities.Attributes +{ + /// <summary> + /// Attribute target should be used by Evaluators. + /// </summary> + [AttributeUsage(AttributeTargets.All)] + public sealed class EvaluatorSideAttribute : Attribute + { + // Intentionally empty. + } +} http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Utilities/Attributes/InteropAttribute.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Utilities/Attributes/InteropAttribute.cs b/lang/cs/Org.Apache.REEF.Utilities/Attributes/InteropAttribute.cs new file mode 100644 index 0000000..6fd5578 --- /dev/null +++ b/lang/cs/Org.Apache.REEF.Utilities/Attributes/InteropAttribute.cs @@ -0,0 +1,48 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +using System; +using System.Collections.Generic; + +namespace Org.Apache.REEF.Utilities.Attributes +{ + /// <summary> + /// Attribute target is used at the Interop layer. Should not be used + /// by the user, and may change at any time without a deprecation phase. + /// </summary> + [AttributeUsage(AttributeTargets.All)] + public sealed class InteropAttribute : Attribute + { + private readonly ISet<string> _cppFiles; + + public InteropAttribute(ISet<string> cppFiles = null) + { + _cppFiles = cppFiles == null ? new HashSet<string>() : new HashSet<string>(cppFiles); + } + + /// <summary> + /// The C++ files associated with the C# file. + /// </summary> + public ISet<string> CppFiles + { + get + { + return new HashSet<string>(_cppFiles); + } + } + } +} http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Utilities/Attributes/PrivateAttribute.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Utilities/Attributes/PrivateAttribute.cs b/lang/cs/Org.Apache.REEF.Utilities/Attributes/PrivateAttribute.cs new file mode 100644 index 0000000..5ba0255 --- /dev/null +++ b/lang/cs/Org.Apache.REEF.Utilities/Attributes/PrivateAttribute.cs @@ -0,0 +1,31 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +using System; + +namespace Org.Apache.REEF.Utilities.Attributes +{ + /// <summary> + /// Attribute target should not be used by users, and may change + /// at any time without a deprecation phase. + /// </summary> + [AttributeUsage(AttributeTargets.All)] + public sealed class PrivateAttribute : Attribute + { + // Intentionally empty. + } +} http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Utilities/Attributes/TaskSideAttribute.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Utilities/Attributes/TaskSideAttribute.cs b/lang/cs/Org.Apache.REEF.Utilities/Attributes/TaskSideAttribute.cs new file mode 100644 index 0000000..4778500 --- /dev/null +++ b/lang/cs/Org.Apache.REEF.Utilities/Attributes/TaskSideAttribute.cs @@ -0,0 +1,30 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +using System; + +namespace Org.Apache.REEF.Utilities.Attributes +{ + /// <summary> + /// Attribute target should be used by Tasks. + /// </summary> + [AttributeUsage(AttributeTargets.All)] + public sealed class TaskSideAttribute : Attribute + { + // Intentionally empty. + } +} http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Utilities/Attributes/UnstableAttribute.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Utilities/Attributes/UnstableAttribute.cs b/lang/cs/Org.Apache.REEF.Utilities/Attributes/UnstableAttribute.cs new file mode 100644 index 0000000..0a4f8c5 --- /dev/null +++ b/lang/cs/Org.Apache.REEF.Utilities/Attributes/UnstableAttribute.cs @@ -0,0 +1,57 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +using System; + +namespace Org.Apache.REEF.Utilities.Attributes +{ + /// <summary> + /// Signals that the API is NOT stabilized. + /// </summary> + [AttributeUsage(AttributeTargets.All)] + public sealed class UnstableAttribute : Attribute + { + private readonly string _descriptionOfLikelyChange; + private readonly string _versionIntroduced; + + /// <summary> + /// </summary> + /// <param name="versionIntroduced">The version in which this unstable API was introduced.</param> + /// <param name="descriptionOfLikelyChange">Description of the likely change in the future.</param> + public UnstableAttribute(string versionIntroduced, string descriptionOfLikelyChange = "") + { + _versionIntroduced = versionIntroduced; + _descriptionOfLikelyChange = descriptionOfLikelyChange; + } + + /// <summary> + /// The version in which this unstable API was introduced. + /// </summary> + public string VersionIntroduced + { + get { return _versionIntroduced; } + } + + /// <summary> + /// Description of the likely change in the future. + /// </summary> + public string DescriptionOfLikelyChange + { + get { return _descriptionOfLikelyChange; } + } + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/reef/blob/81090b63/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj index d6b5f08..b251f84 100644 --- a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj +++ b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj @@ -38,6 +38,13 @@ under the License. </ItemGroup> <ItemGroup> <Compile Include="AsyncUtils\RemoveSynchronizationContextAwaiter.cs" /> + <Compile Include="Attributes\ClientSideAttribute.cs" /> + <Compile Include="Attributes\DriverSideAttribute.cs" /> + <Compile Include="Attributes\EvaluatorSideAttribute.cs" /> + <Compile Include="Attributes\InteropAttribute.cs" /> + <Compile Include="Attributes\PrivateAttribute.cs" /> + <Compile Include="Attributes\TaskSideAttribute.cs" /> + <Compile Include="Attributes\UnstableAttribute.cs" /> <Compile Include="AvroUtils.cs" /> <Compile Include="ByteUtilities.cs" /> <Compile Include="Diagnostics\DiagnosticsMessages.cs" /> @@ -67,4 +74,4 @@ under the License. <Target Name="AfterBuild"> </Target> --> -</Project> +</Project> \ No newline at end of file
