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
5e8352ea
Commit
5e8352ea
authored
9 years ago
by
Nelson Tavares de Sousa
Browse files
Options
Downloads
Patches
Plain Diff
moved from LinkedLists to HashSets
parent
b8dd46cf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/teetime/framework/Analysis.java
+3
-3
3 additions, 3 deletions
src/main/java/teetime/framework/Analysis.java
src/main/java/teetime/framework/AnalysisConfiguration.java
+6
-6
6 additions, 6 deletions
src/main/java/teetime/framework/AnalysisConfiguration.java
with
9 additions
and
9 deletions
src/main/java/teetime/framework/Analysis.java
+
3
−
3
View file @
5e8352ea
...
@@ -109,7 +109,7 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
...
@@ -109,7 +109,7 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
// BETTER validate concurrently
// BETTER validate concurrently
private
void
validateStages
()
{
private
void
validateStages
()
{
final
Lis
t
<
Stage
>
threadableStageJobs
=
this
.
configuration
.
getThreadableStageJobs
();
final
Se
t
<
Stage
>
threadableStageJobs
=
this
.
configuration
.
getThreadableStageJobs
();
for
(
Stage
stage
:
threadableStageJobs
)
{
for
(
Stage
stage
:
threadableStageJobs
)
{
// // portConnectionValidator.validate(stage);
// // portConnectionValidator.validate(stage);
// }
// }
...
@@ -134,7 +134,7 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
...
@@ -134,7 +134,7 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
instantiatePipes
();
instantiatePipes
();
final
Lis
t
<
Stage
>
threadableStageJobs
=
this
.
configuration
.
getThreadableStageJobs
();
final
Se
t
<
Stage
>
threadableStageJobs
=
this
.
configuration
.
getThreadableStageJobs
();
if
(
threadableStageJobs
.
isEmpty
())
{
if
(
threadableStageJobs
.
isEmpty
())
{
throw
new
IllegalStateException
(
"No stage was added using the addThreadableStage(..) method. Add at least one stage."
);
throw
new
IllegalStateException
(
"No stage was added using the addThreadableStage(..) method. Add at least one stage."
);
}
}
...
@@ -177,7 +177,7 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
...
@@ -177,7 +177,7 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
}
}
private
void
instantiatePipes
()
{
private
void
instantiatePipes
()
{
Lis
t
<
Stage
>
threadableStageJobs
=
configuration
.
getThreadableStageJobs
();
Se
t
<
Stage
>
threadableStageJobs
=
configuration
.
getThreadableStageJobs
();
for
(
Connection
connection
:
configuration
.
getConnections
())
{
for
(
Connection
connection
:
configuration
.
getConnections
())
{
if
(
threadableStageJobs
.
contains
(
connection
.
getTargetPort
().
getOwningStage
()))
{
if
(
threadableStageJobs
.
contains
(
connection
.
getTargetPort
().
getOwningStage
()))
{
if
(
connection
.
getCapacity
()
!=
0
)
{
if
(
connection
.
getCapacity
()
!=
0
)
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/teetime/framework/AnalysisConfiguration.java
+
6
−
6
View file @
5e8352ea
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
*/
*/
package
teetime.framework
;
package
teetime.framework
;
import
java.util.
LinkedLis
t
;
import
java.util.
HashSe
t
;
import
java.util.
Lis
t
;
import
java.util.
Se
t
;
import
teetime.framework.pipe.IPipe
;
import
teetime.framework.pipe.IPipe
;
import
teetime.framework.pipe.IPipeFactory
;
import
teetime.framework.pipe.IPipeFactory
;
...
@@ -31,8 +31,8 @@ import teetime.util.Connection;
...
@@ -31,8 +31,8 @@ import teetime.util.Connection;
*/
*/
public
abstract
class
AnalysisConfiguration
{
public
abstract
class
AnalysisConfiguration
{
private
final
Lis
t
<
Stage
>
threadableStageJobs
=
new
LinkedLis
t
<
Stage
>();
private
final
Se
t
<
Stage
>
threadableStageJobs
=
new
HashSe
t
<
Stage
>();
private
final
Lis
t
<
Connection
<?>>
connections
=
new
LinkedLis
t
<
Connection
<?>>();
private
final
Se
t
<
Connection
<?>>
connections
=
new
HashSe
t
<
Connection
<?>>();
@SuppressWarnings
(
"deprecation"
)
@SuppressWarnings
(
"deprecation"
)
private
static
final
PipeFactoryRegistry
PIPE_FACTORY_REGISTRY
=
PipeFactoryRegistry
.
INSTANCE
;
private
static
final
PipeFactoryRegistry
PIPE_FACTORY_REGISTRY
=
PipeFactoryRegistry
.
INSTANCE
;
...
@@ -50,7 +50,7 @@ public abstract class AnalysisConfiguration {
...
@@ -50,7 +50,7 @@ public abstract class AnalysisConfiguration {
*/
*/
private
final
static
IPipeFactory
interUnboundedThreadFactory
=
PIPE_FACTORY_REGISTRY
.
getPipeFactory
(
ThreadCommunication
.
INTER
,
PipeOrdering
.
QUEUE_BASED
,
true
);
private
final
static
IPipeFactory
interUnboundedThreadFactory
=
PIPE_FACTORY_REGISTRY
.
getPipeFactory
(
ThreadCommunication
.
INTER
,
PipeOrdering
.
QUEUE_BASED
,
true
);
Lis
t
<
Stage
>
getThreadableStageJobs
()
{
Se
t
<
Stage
>
getThreadableStageJobs
()
{
return
this
.
threadableStageJobs
;
return
this
.
threadableStageJobs
;
}
}
...
@@ -180,7 +180,7 @@ public abstract class AnalysisConfiguration {
...
@@ -180,7 +180,7 @@ public abstract class AnalysisConfiguration {
*
*
* @return a list of pairs of Out- and InputPorts, which are connected
* @return a list of pairs of Out- and InputPorts, which are connected
*/
*/
protected
Lis
t
<
Connection
<?>>
getConnections
()
{
protected
Se
t
<
Connection
<?>>
getConnections
()
{
return
connections
;
return
connections
;
}
}
...
...
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