Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

[REEF-667] Made IIDentifiable.Id immutable. #470

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lang/cs/Org.Apache.REEF.Common/Api/AbstractFailure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public AbstractFailure(string id, string message, string description)
/// <summary>
/// Identifier of the entity that produced the error. Cannot be null.
/// </summary>
public string Id { get; set; }
public string Id { get; private set; }

public string Message { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public EvaluatorException(string evaluatorId, Exception cause, IRunningTask runn
public string Id
{
get { return _evaluatorId; }
set { }
}
}
}
1 change: 0 additions & 1 deletion lang/cs/Org.Apache.REEF.Common/Exceptions/JobException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public JobException(string jobId, Exception cause)
public string Id
{
get { return _jobId; }
set { }
}
}
}
4 changes: 0 additions & 4 deletions lang/cs/Org.Apache.REEF.Driver/Bridge/Events/ActiveContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ public string Id
{
return Clr2Java.GetId();
}

set
{
}
}

public string EvaluatorId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public AllocatedEvaluator(IAllocatedEvaluaotrClr2Java clr2Java, ISet<IConfigurat
[DataMember]
public string InstanceId { get; set; }

public string Id { get; set; }
public string Id { get; private set; }

public string EvaluatorBatchId { get; set; }

Expand Down
4 changes: 0 additions & 4 deletions lang/cs/Org.Apache.REEF.Driver/Bridge/Events/ClosedContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ public string Id
{
return _id;
}

set
{
}
}

public string EvaluatorId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ public string Id
{
return CompletedEvaluatorClr2Java.GetId();
}

set
{
}
}

[DataMember]
Expand Down
4 changes: 0 additions & 4 deletions lang/cs/Org.Apache.REEF.Driver/Bridge/Events/CompletedTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ public string Id
{
return CompletedTaskClr2Java.GetId();
}

set
{
}
}

public IActiveContext ActiveContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public ContextMessage(IContextMessageClr2Java clr2Java)
public string Id
{
get { return _id; }
set { }
}

public string MessageSourceId
Expand Down
4 changes: 0 additions & 4 deletions lang/cs/Org.Apache.REEF.Driver/Bridge/Events/FailedContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ public string Id
{
return _id;
}

set
{
}
}

public string EvaluatorId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public FailedEvaluator(IFailedEvaluatorClr2Java clr2Java)
[DataMember]
public string InstanceId { get; set; }

public string Id { get; set; }
public string Id { get; private set; }

public EvaluatorException EvaluatorException { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion lang/cs/Org.Apache.REEF.Driver/Bridge/Events/FailedTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public FailedTask(IFailedTaskClr2Java failedTaskClr2Java)
[DataMember]
public string InstanceId { get; set; }

public string Id { get; set; }
public string Id { get; private set; }

public string Message { get; set; }

Expand Down
5 changes: 0 additions & 5 deletions lang/cs/Org.Apache.REEF.Driver/Bridge/Events/RunningTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ public string Id
{
return _runningTaskClr2Java.GetId();
}

set
{
Id = value;
}
}

public void Send(byte[] message)
Expand Down
4 changes: 0 additions & 4 deletions lang/cs/Org.Apache.REEF.Driver/Bridge/Events/SuspendedTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ public string Id
{
return SuspendedTaskClr2Java.GetId();
}

set
{
}
}

public IActiveContext ActiveContext
Expand Down
8 changes: 7 additions & 1 deletion lang/cs/Org.Apache.REEF.Utilities/IIdentifiable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@

namespace Org.Apache.REEF.Utilities
{
/// <summary>
/// Denotes an object that has a string identifier.
/// </summary>
public interface IIdentifiable
{
string Id { get; set; }
/// <summary>
/// The Id of this object, e.g. the TaskId.
/// </summary>
string Id { get;}
}
}