Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TeeTime-Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nelson Tavares de Sousa
TeeTime-Framework
Commits
489e784b
Commit
489e784b
authored
10 years ago
by
Christian Wulf
Browse files
Options
Downloads
Patches
Plain Diff
fixed #67 Use a Set instead of Map<T, Void> in AbstractStage
parent
57eb0d3f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/teetime/framework/AbstractStage.java
+5
-5
5 additions, 5 deletions
src/main/java/teetime/framework/AbstractStage.java
with
5 additions
and
5 deletions
src/main/java/teetime/framework/AbstractStage.java
+
5
−
5
View file @
489e784b
package
teetime.framework
;
package
teetime.framework
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Hash
Map
;
import
java.util.Hash
Set
;
import
java.util.List
;
import
java.util.List
;
import
java.util.
Map
;
import
java.util.
Set
;
import
java.util.UUID
;
import
java.util.UUID
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -32,7 +32,7 @@ public abstract class AbstractStage implements IStage {
...
@@ -32,7 +32,7 @@ public abstract class AbstractStage implements IStage {
/** A cached instance of <code>outputPortList</code> to avoid creating an iterator each time iterating it */
/** A cached instance of <code>outputPortList</code> to avoid creating an iterator each time iterating it */
protected
OutputPort
<?>[]
cachedOutputPorts
;
protected
OutputPort
<?>[]
cachedOutputPorts
;
private
final
Map
<
ISignal
,
Void
>
visited
=
new
Hash
Map
<
ISignal
,
Void
>();
private
final
Set
<
ISignal
>
triggeredSignals
=
new
Hash
Set
<
ISignal
>();
private
boolean
shouldTerminate
;
private
boolean
shouldTerminate
;
public
AbstractStage
()
{
public
AbstractStage
()
{
...
@@ -104,12 +104,12 @@ public abstract class AbstractStage implements IStage {
...
@@ -104,12 +104,12 @@ public abstract class AbstractStage implements IStage {
}
}
protected
boolean
alreadyVisited
(
final
ISignal
signal
,
final
InputPort
<?>
inputPort
)
{
protected
boolean
alreadyVisited
(
final
ISignal
signal
,
final
InputPort
<?>
inputPort
)
{
if
(
this
.
visited
.
contains
Key
(
signal
))
{
if
(
this
.
triggeredSignals
.
contains
(
signal
))
{
this
.
logger
.
trace
(
"Got signal: "
+
signal
+
" again from input port: "
+
inputPort
);
this
.
logger
.
trace
(
"Got signal: "
+
signal
+
" again from input port: "
+
inputPort
);
return
true
;
return
true
;
}
else
{
}
else
{
this
.
logger
.
trace
(
"Got signal: "
+
signal
+
" from input port: "
+
inputPort
);
this
.
logger
.
trace
(
"Got signal: "
+
signal
+
" from input port: "
+
inputPort
);
this
.
visited
.
put
(
signal
,
nul
l
);
this
.
triggeredSignals
.
add
(
signa
l
);
return
false
;
return
false
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment