Skip to content

Commit

Permalink
expose methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-heinz committed Jun 24, 2020
1 parent 81b3c42 commit 4e636c5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.5
1.0.6
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ private void Consume(int unitOfOrder)
Logger.Exception(ex);
Stop();
}

return;
}

Expand All @@ -69,7 +70,7 @@ private void Consume(int unitOfOrder)
}
}

void IConsumer.OnStart()
public virtual void OnStart()
{
if (_isRunning)
{
Expand All @@ -90,7 +91,7 @@ void IConsumer.OnStart()
}
}

void IConsumer.OnStarted()
public virtual void OnStarted()
{
}

Expand All @@ -114,7 +115,7 @@ void IConsumer.OnStop()
Stop();
}

void IConsumer.OnStopped()
public virtual void OnStopped()
{
}

Expand All @@ -137,5 +138,16 @@ private void Stop()
_threads[i] = null;
}
}

public void LogStatus()
{
Logger.Info($"[{_identity}] _isRunning :{_isRunning}");
for (int i = 0; i < _maxUnitOfOrder; i++)
{
Logger.Info($"[{_identity}] _threads[{i}].IsAlive:{_threads[i].IsAlive}");
Logger.Info($"[{_identity}] _threads[{i}].ThreadState:{_threads[i].ThreadState}");
Logger.Info($"[{_identity}] _queues[{i}].Count :{_queues[i].Count}");
}
}
}
}

0 comments on commit 4e636c5

Please sign in to comment.