Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kieker-TeeTime-Stages
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
TeeTime
Kieker-TeeTime-Stages
Commits
6d1c204b
Commit
6d1c204b
authored
10 years ago
by
Christian Wulf
Browse files
Options
Downloads
Patches
Plain Diff
refactored Pipeline to a composite stage
parent
cdf208bb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/teetime/framework/Pipeline.java
+10
-41
10 additions, 41 deletions
src/main/java/teetime/framework/Pipeline.java
with
10 additions
and
41 deletions
src/main/java/teetime/framework/Pipeline.java
+
10
−
41
View file @
6d1c204b
package
teetime.framework
;
import
java.util.Collection
;
import
java.util.LinkedList
;
import
java.util.List
;
import
teetime.framework.signal.ISignal
;
import
teetime.framework.validation.InvalidPortConnection
;
/**
*
* @author Christian Wulf
...
...
@@ -13,59 +12,29 @@ import teetime.framework.validation.InvalidPortConnection;
* the type of the last stage in this pipeline
*/
// TODO Consider to move it in the framework
public
final
class
Pipeline
<
L
extends
Stage
>
extends
Stage
{
public
final
class
Pipeline
<
L
extends
Stage
>
extends
Composite
Stage
{
private
final
Stage
firstStage
;
private
final
L
lastStage
;
private
final
L
ist
<
L
>
lastStage
s
=
new
LinkedList
<
L
>()
;
public
Pipeline
(
final
Stage
firstStage
,
final
L
lastStage
)
{
super
();
this
.
firstStage
=
firstStage
;
this
.
lastStage
=
lastStage
;
}
@Override
public
TerminationStrategy
getTerminationStrategy
()
{
return
firstStage
.
getTerminationStrategy
();
}
@Override
public
void
terminate
()
{
firstStage
.
terminate
();
}
@Override
public
boolean
shouldBeTerminated
()
{
return
firstStage
.
shouldBeTerminated
();
this
.
lastStages
.
add
(
lastStage
);
}
@Override
public
void
executeWithPorts
()
{
firstStage
.
executeWithPorts
();
}
@Override
public
void
onSignal
(
final
ISignal
signal
,
final
InputPort
<?>
inputPort
)
{
firstStage
.
onSignal
(
signal
,
inputPort
);
}
@Override
public
void
validateOutputPorts
(
final
List
<
InvalidPortConnection
>
invalidPortConnections
)
{
lastStage
.
validateOutputPorts
(
invalidPortConnections
);
protected
Stage
getFirstStage
()
{
return
firstStage
;
}
public
L
getLastStage
()
{
return
lastStage
;
}
@Override
protected
InputPort
<?>[]
getInputPorts
()
{
return
firstStage
.
getInputPorts
();
return
lastStages
.
get
(
0
);
}
@Override
protected
boolean
isStarted
()
{
return
fir
stStage
.
isStarted
()
;
protected
Collection
<?
extends
Stage
>
getLastStages
()
{
return
la
stStage
s
;
}
@Override
...
...
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