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
b74d1fab
Commit
b74d1fab
authored
9 years ago
by
Nelson Tavares de Sousa
Browse files
Options
Downloads
Patches
Plain Diff
not working yet; new exception fails on various tests
parent
f3cd95a7
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/Analysis.java
+8
-1
8 additions, 1 deletion
src/main/java/teetime/framework/Analysis.java
with
8 additions
and
1 deletion
src/main/java/teetime/framework/Analysis.java
+
8
−
1
View file @
b74d1fab
...
@@ -73,6 +73,7 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
...
@@ -73,6 +73,7 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
private
final
IPipeFactory
interBoundedThreadPipeFactory
=
new
SpScPipeFactory
();
private
final
IPipeFactory
interBoundedThreadPipeFactory
=
new
SpScPipeFactory
();
private
final
IPipeFactory
interUnboundedThreadPipeFactory
=
new
UnboundedSpScPipeFactory
();
private
final
IPipeFactory
interUnboundedThreadPipeFactory
=
new
UnboundedSpScPipeFactory
();
private
final
IPipeFactory
intraThreadPipeFactory
=
new
SingleElementPipeFactory
();
private
final
IPipeFactory
intraThreadPipeFactory
=
new
SingleElementPipeFactory
();
private
Integer
connected
=
new
Integer
(
0
);
/**
/**
* Creates a new {@link Analysis} that skips validating the port connections and uses the default listener.
* Creates a new {@link Analysis} that skips validating the port connections and uses the default listener.
...
@@ -208,6 +209,9 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
...
@@ -208,6 +209,9 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
colors
.
put
(
threadableStage
,
i
);
// Markiere den threadHead
colors
.
put
(
threadableStage
,
i
);
// Markiere den threadHead
colorAndConnectStages
(
i
,
colors
,
threadableStage
);
colorAndConnectStages
(
i
,
colors
,
threadableStage
);
}
}
if
(
configuration
.
getConnections
().
size
()
!=
connected
)
{
throw
new
IllegalStateException
(
"remaining "
+
(
configuration
.
getConnections
().
size
()
-
connected
)
+
" connections"
);
}
}
}
public
void
colorAndConnectStages
(
final
Integer
i
,
final
Map
<
Stage
,
Integer
>
colors
,
final
Stage
threadableStage
)
{
public
void
colorAndConnectStages
(
final
Integer
i
,
final
Map
<
Stage
,
Integer
>
colors
,
final
Stage
threadableStage
)
{
...
@@ -228,11 +232,14 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
...
@@ -228,11 +232,14 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
}
}
}
else
{
}
else
{
if
(
colors
.
containsKey
(
targetStage
))
{
if
(
colors
.
containsKey
(
targetStage
))
{
throw
new
IllegalStateException
(
"Crossing threads"
);
if
(
colors
.
get
(
targetStage
).
equals
(
i
))
{
throw
new
IllegalStateException
(
"Crossing threads"
);
// One stage is connected to a stage of another thread (not the "headstage")
}
}
}
intraThreadPipeFactory
.
create
(
connection
.
getSourcePort
(),
connection
.
getTargetPort
());
intraThreadPipeFactory
.
create
(
connection
.
getSourcePort
(),
connection
.
getTargetPort
());
colors
.
put
(
targetStage
,
i
);
colors
.
put
(
targetStage
,
i
);
}
}
connected
++;
// configuration.getConnections().remove(connection); remove connection to increase performance
// configuration.getConnections().remove(connection); remove connection to increase performance
colorAndConnectStages
(
i
,
colors
,
targetStage
);
colorAndConnectStages
(
i
,
colors
,
targetStage
);
}
}
...
...
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