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
6e3dfe8b
Commit
6e3dfe8b
authored
10 years ago
by
Nils Christian Ehmke
Browse files
Options
Downloads
Patches
Plain Diff
Composite Stages
parent
07418d66
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/CompositeStage.java
+10
-14
10 additions, 14 deletions
src/main/java/teetime/framework/CompositeStage.java
with
10 additions
and
14 deletions
src/main/java/teetime/framework/CompositeStage.java
+
10
−
14
View file @
6e3dfe8b
...
...
@@ -16,47 +16,43 @@ import teetime.framework.validation.InvalidPortConnection;
@SuppressWarnings
(
"PMD.AbstractNaming"
)
public
abstract
class
CompositeStage
extends
Stage
{
private
final
Stage
firstStage
;
private
final
Collection
<
Stage
>
lastStages
;
protected
abstract
Stage
getFirstStage
();
protected
CompositeStage
(
final
Stage
firstStage
,
final
Collection
<
Stage
>
lastStages
)
{
this
.
firstStage
=
firstStage
;
this
.
lastStages
=
lastStages
;
}
protected
abstract
Collection
<?
extends
Stage
>
getLastStages
();
@Override
protected
void
executeWithPorts
()
{
f
irstStage
.
executeWithPorts
();
getF
irstStage
()
.
executeWithPorts
();
}
@Override
protected
void
onSignal
(
final
ISignal
signal
,
final
InputPort
<?>
inputPort
)
{
f
irstStage
.
onSignal
(
signal
,
inputPort
);
getF
irstStage
()
.
onSignal
(
signal
,
inputPort
);
}
@Override
protected
TerminationStrategy
getTerminationStrategy
()
{
return
f
irstStage
.
getTerminationStrategy
();
return
getF
irstStage
()
.
getTerminationStrategy
();
}
@Override
protected
void
terminate
()
{
f
irstStage
.
terminate
();
getF
irstStage
()
.
terminate
();
}
@Override
protected
boolean
shouldBeTerminated
()
{
return
f
irstStage
.
shouldBeTerminated
();
return
getF
irstStage
()
.
shouldBeTerminated
();
}
@Override
protected
InputPort
<?>[]
getInputPorts
()
{
return
f
irstStage
.
getInputPorts
();
return
getF
irstStage
()
.
getInputPorts
();
}
@Override
public
void
validateOutputPorts
(
final
List
<
InvalidPortConnection
>
invalidPortConnections
)
{
for
(
final
Stage
s
:
l
astStages
)
{
for
(
final
Stage
s
:
getL
astStages
()
)
{
s
.
validateOutputPorts
(
invalidPortConnections
);
}
}
...
...
@@ -64,7 +60,7 @@ public abstract class CompositeStage extends Stage {
@Override
protected
boolean
isStarted
()
{
boolean
isStarted
=
true
;
for
(
final
Stage
s
:
l
astStages
)
{
for
(
final
Stage
s
:
getL
astStages
()
)
{
isStarted
=
isStarted
&&
s
.
isStarted
();
}
return
isStarted
;
...
...
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