Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated access modifiers #20

Merged
merged 3 commits into from
Oct 27, 2018
Merged
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
4 changes: 2 additions & 2 deletions src/Vlingo.Actors.Tests/ActorLifecycleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public LifecycleActor(TestResults testResults)
this.testResults = testResults;
}

internal override void BeforeStart()
internal protected override void BeforeStart()
{
testResults.receivedBeforeStart.Set(true);
testResults.until.Happened();
}

internal override void AfterStop()
internal protected override void AfterStop()
{
testResults.receivedAfterStop.Set(true);
testResults.until.Happened();
Expand Down
4 changes: 2 additions & 2 deletions src/Vlingo.Actors.Tests/ActorStopTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void CreateChildren()
ChildActorFor<IChildCreatingStoppable>(Definition.Has<ChildCreatingStoppableActor>(Definition.Parameters(testResults), $"{pre}.3"));
}

internal override void BeforeStart()
internal protected override void BeforeStart()
{
base.BeforeStart();
if (testResults.untilStart != null)
Expand All @@ -105,7 +105,7 @@ internal override void BeforeStart()
}

private static readonly object afterStopMutex = new object();
internal override void AfterStop()
internal protected override void AfterStop()
{
lock (afterStopMutex)
{
Expand Down
15 changes: 0 additions & 15 deletions src/Vlingo.Actors.Tests/Proxy/ProxyTest.cs

This file was deleted.

10 changes: 5 additions & 5 deletions src/Vlingo.Actors.Tests/Supervision/FailureControlActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,35 @@ public void FailNow()
throw new ApplicationException("Intended failure.");
}

internal override void BeforeStart()
internal protected override void BeforeStart()
{
testResults.BeforeStartCount.IncrementAndGet();
testResults.UntilFailNow.Happened();
base.BeforeStart();
}

internal override void AfterStop()
internal protected override void AfterStop()
{
testResults.AfterStopCount.IncrementAndGet();
testResults.UntilFailNow.Happened();
base.AfterStop();
}

internal override void BeforeRestart(Exception reason)
internal protected override void BeforeRestart(Exception reason)
{
testResults.BeforeRestartCount.IncrementAndGet();
testResults.UntilFailNow.Happened();
base.BeforeRestart(reason);
}

internal override void AfterRestart(Exception reason)
internal protected override void AfterRestart(Exception reason)
{
base.AfterRestart(reason);
testResults.AfterRestartCount.IncrementAndGet();
testResults.UntilAfterRestart.Happened();
}

internal override void BeforeResume(Exception reason)
internal protected override void BeforeResume(Exception reason)
{
testResults.BeforeResume.IncrementAndGet();
testResults.UntilBeforeResume.Happened();
Expand Down
31 changes: 17 additions & 14 deletions src/Vlingo.Actors/Actor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected T ChildActorFor<T>(Definition definition)
}
}

internal ICompletes<T> Completes<T>()
internal protected ICompletes<T> Completes<T>()
{
if(completes == null)
{
Expand All @@ -110,7 +110,7 @@ internal ICompletes<T> Completes<T>()

protected Definition Definition => LifeCycle.Definition;

internal ILogger Logger => LifeCycle.Environment.Logger;
internal protected ILogger Logger => LifeCycle.Environment.Logger;

protected T ParentAs<T>()
{
Expand All @@ -128,7 +128,7 @@ protected void Secure()
LifeCycle.Secure();
}

internal T SelfAs<T>()
internal protected T SelfAs<T>()
{
return LifeCycle.Environment.Stage.ActorProxyFor<T>(this, LifeCycle.Environment.Mailbox);
}
Expand All @@ -142,7 +142,7 @@ protected IOutcomeInterest<TOutcome> SelfAsOutcomeInterest<TOutcome, TRef>(TRef
return new OutcomeInterestActorProxy<TOutcome, TRef>(outcomeAware, reference);
}

internal Stage Stage
internal protected Stage Stage
{
get
{
Expand All @@ -155,26 +155,29 @@ internal Stage Stage
}
}

protected Stage StageNamed(string name)
internal protected Stage StageNamed(string name)
{
return LifeCycle.Environment.Stage.World.StageNamed(name);
}

//=======================================
// stowing/dispersing
//=======================================

internal bool IsDispersing =>
internal protected virtual bool IsDispersing =>
LifeCycle.Environment.Stowage.IsDispersing;


protected void DisperseStowedMessages()
internal protected virtual void DisperseStowedMessages()
{
LifeCycle.Environment.Stowage.DispersingMode();
}

internal bool IsStowing =>
internal protected virtual bool IsStowing =>
LifeCycle.Environment.Stowage.IsStowing;


protected void StowMessages()
internal protected virtual void StowMessages()
{
LifeCycle.Environment.Stowage.StowingMode();
}
Expand All @@ -183,29 +186,29 @@ protected void StowMessages()
// life cycle overrides
//=======================================

internal virtual void BeforeStart()
internal protected virtual void BeforeStart()
{
// override
}

internal virtual void AfterStop()
internal protected virtual void AfterStop()
{
// override
}

internal virtual void BeforeRestart(Exception reason)
internal protected virtual void BeforeRestart(Exception reason)
{
// override
LifeCycle.AfterStop(this);
}

internal virtual void AfterRestart(Exception reason)
internal protected virtual void AfterRestart(Exception reason)
{
// override
LifeCycle.BeforeStart(this);
}

internal virtual void BeforeResume(Exception reason)
internal protected virtual void BeforeResume(Exception reason)
{
// override
}
Expand Down
2 changes: 1 addition & 1 deletion src/Vlingo.Actors/ActorFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Vlingo.Actors
{
public class ActorFactory
internal class ActorFactory
{
internal static readonly ThreadLocal<Environment> ThreadLocalEnvironment = new ThreadLocal<Environment>(false);

Expand Down
2 changes: 1 addition & 1 deletion src/Vlingo.Actors/ActorProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Vlingo.Actors
{
public sealed class ActorProxy
internal static class ActorProxy
{
private static readonly DynaClassLoader classLoader = new DynaClassLoader(typeof(ActorProxy).GetAssemblyLoadContext());
private static readonly DynaCompiler proxyCompiler = new DynaCompiler();
Expand Down
2 changes: 0 additions & 2 deletions src/Vlingo.Actors/AddressFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,5 @@ public override string ToString()
=> $"AddressFactory[highId={highId.Get()}, nextId={nextId.Get()}]";

internal int TestNextIdValue() => nextId.Get();


}
}
2 changes: 1 addition & 1 deletion src/Vlingo.Actors/CommonSupervisor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Vlingo.Actors
{
public abstract class CommonSupervisor : DefaultSupervisor
internal abstract class CommonSupervisor : DefaultSupervisor
{
internal CommonSupervisor() { }
}
Expand Down
11 changes: 0 additions & 11 deletions src/Vlingo.Actors/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@ namespace Vlingo.Actors
{
public class Configuration
{
private ConcurrentQueueMailboxPluginConfiguration concurrentQueueMailboxPluginConfiguration;
private CommonSupervisorsPluginConfiguration commonSupervisorsPluginConfiguration;
private DefaultSupervisorOverridePluginConfiguration defaultSupervisorOverridePluginConfiguration;
private ConsoleLoggerPluginConfiguration jdkLoggerPluginConfiguration;
private PooledCompletesPluginConfiguration pooledCompletesPluginConfiguration;
private ManyToOneConcurrentArrayQueuePluginConfiguration manyToOneConcurrentArrayQueuePluginConfiguration;
private SharedRingBufferMailboxPluginConfiguration sharedRingBufferMailboxPluginConfiguration;
private string mainProxyGeneratedClassesPath;
private string mainProxyGeneratedSourcesPath;
private string testProxyGeneratedClassesPath;
private string testProxyGeneratedSourcesPath;
private List<IPlugin> plugins;

public static Configuration Define() => new Configuration();
Expand Down
2 changes: 1 addition & 1 deletion src/Vlingo.Actors/DeadLettersActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void RegisterListener(IDeadLettersListener listener)
listeners.Add(listener);
}

internal override void AfterStop()
internal protected override void AfterStop()
{
Stage.World.DeadLetters = null;
base.AfterStop();
Expand Down
2 changes: 1 addition & 1 deletion src/Vlingo.Actors/Definition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Vlingo.Actors
// TODO: possible removal/cleanup of overloaded ctors
public sealed class Definition
{
internal static readonly List<object> NoParameters = new List<object>();
public static readonly List<object> NoParameters = new List<object>();

public static Definition Has<T>(List<object> parameters) where T : Actor
=> new Definition(typeof(T), parameters);
Expand Down
4 changes: 2 additions & 2 deletions src/Vlingo.Actors/Directory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

namespace Vlingo.Actors
{
public sealed class Directory
internal sealed class Directory
{
private readonly ConcurrentDictionary<Address, Actor>[] maps;

public Directory()
internal Directory()
{
maps = Build();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Vlingo.Actors/DirectoryScannerActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Vlingo.Actors
{
public class DirectoryScannerActor : Actor, IDirectoryScanner
internal class DirectoryScannerActor : Actor, IDirectoryScanner
{
private readonly Directory directory;

Expand Down
2 changes: 1 addition & 1 deletion src/Vlingo.Actors/Environment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Vlingo.Actors
{
public class Environment
internal class Environment
{
internal Address Address { get; }
internal List<Actor> Children { get; }
Expand Down
4 changes: 2 additions & 2 deletions src/Vlingo.Actors/FailureMark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public FailureMark()
Reset();
}

protected internal bool FailedWithExcessiveFailures(long period, int intensity)
protected internal virtual bool FailedWithExcessiveFailures(long period, int intensity)
{
if (intensity == SupervisionStrategyConstants.ForeverIntensity)
{
Expand Down Expand Up @@ -58,7 +58,7 @@ protected internal bool FailedWithExcessiveFailures(long period, int intensity)
return false;
}

protected internal void Reset()
protected internal virtual void Reset()
{
startOfPeriod = 0;
timedIntensity = 0;
Expand Down
1 change: 0 additions & 1 deletion src/Vlingo.Actors/FailureOutcome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public class FailureOutcome<T> : Outcome<T>
{
public FailureOutcome(T value) : base(value)
{

}
}
}
2 changes: 1 addition & 1 deletion src/Vlingo.Actors/ICompletes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface ICompletes<T> : ICompletes
ICompletes<T> AndThen(Action<T> consumer);
ICompletes<T> AtLast(Action<T> consumer);
ICompletes<T> AtLast(Func<T> supplier);
T Outcome { get; }
new T Outcome { get; }
ICompletes<TOutcome> With<TOutcome>(TOutcome outcome);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Vlingo.Actors/ICompletesEventually.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public interface ICompletesEventually : IStoppable

public abstract class CompletesEventually : ICompletesEventually
{
public bool IsStopped => false;
public virtual bool IsStopped => false;

public void Stop()
public virtual void Stop()
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Vlingo.Actors/LifeCycle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

namespace Vlingo.Actors
{
public sealed class LifeCycle
internal sealed class LifeCycle
{

public Environment Environment { get; set; }
internal Environment Environment { get; set; }

internal LifeCycle(Environment environment)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Vlingo.Actors/LocalMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public LocalMessage(LocalMessage<T> message)

private Action<T> Consumer { get; }

public void Deliver()
public virtual void Deliver()
{
if (Actor.LifeCycle.IsResuming)
{
Expand All @@ -59,7 +59,7 @@ public void Deliver()
}
}

public string Representation { get; }
public virtual string Representation { get; }

public virtual bool IsStowed => false;

Expand Down
Loading