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
cb56fbf0
Commit
cb56fbf0
authored
10 years ago
by
Nelson Tavares de Sousa
Browse files
Options
Downloads
Patches
Plain Diff
visibility changes and renameing
parent
0cccdfa6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/teetime/framework/AbstractRunnableStage.java
+3
-3
3 additions, 3 deletions
src/main/java/teetime/framework/AbstractRunnableStage.java
src/main/java/teetime/framework/ConfigurationContext.java
+9
-9
9 additions, 9 deletions
src/main/java/teetime/framework/ConfigurationContext.java
with
12 additions
and
12 deletions
src/main/java/teetime/framework/AbstractRunnableStage.java
+
3
−
3
View file @
cb56fbf0
...
@@ -33,7 +33,7 @@ abstract class AbstractRunnableStage implements Runnable {
...
@@ -33,7 +33,7 @@ abstract class AbstractRunnableStage implements Runnable {
this
.
logger
=
LoggerFactory
.
getLogger
(
stage
.
getClass
());
this
.
logger
=
LoggerFactory
.
getLogger
(
stage
.
getClass
());
if
(
stage
.
getTerminationStrategy
()
!=
TerminationStrategy
.
BY_INTERRUPT
)
{
if
(
stage
.
getTerminationStrategy
()
!=
TerminationStrategy
.
BY_INTERRUPT
)
{
stage
.
owningContext
.
get
Runtime
Service
().
getRunnableCounter
().
inc
();
stage
.
owningContext
.
get
Thread
Service
().
getRunnableCounter
().
inc
();
}
}
}
}
...
@@ -50,7 +50,7 @@ abstract class AbstractRunnableStage implements Runnable {
...
@@ -50,7 +50,7 @@ abstract class AbstractRunnableStage implements Runnable {
}
while
(!
stage
.
shouldBeTerminated
());
}
while
(!
stage
.
shouldBeTerminated
());
}
catch
(
TerminateException
e
)
{
}
catch
(
TerminateException
e
)
{
this
.
stage
.
terminate
();
this
.
stage
.
terminate
();
stage
.
owningContext
.
get
Runtime
Service
().
onTerminate
();
stage
.
owningContext
.
get
Thread
Service
().
onTerminate
();
throw
e
;
// FIXME: Still needed?
throw
e
;
// FIXME: Still needed?
}
finally
{
}
finally
{
afterStageExecution
();
afterStageExecution
();
...
@@ -64,7 +64,7 @@ abstract class AbstractRunnableStage implements Runnable {
...
@@ -64,7 +64,7 @@ abstract class AbstractRunnableStage implements Runnable {
}
}
}
finally
{
}
finally
{
if
(
stage
.
getTerminationStrategy
()
!=
TerminationStrategy
.
BY_INTERRUPT
)
{
if
(
stage
.
getTerminationStrategy
()
!=
TerminationStrategy
.
BY_INTERRUPT
)
{
stage
.
owningContext
.
get
Runtime
Service
().
getRunnableCounter
().
dec
();
stage
.
owningContext
.
get
Thread
Service
().
getRunnableCounter
().
dec
();
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/teetime/framework/ConfigurationContext.java
+
9
−
9
View file @
cb56fbf0
...
@@ -32,7 +32,7 @@ import teetime.framework.pipe.InstantiationPipe;
...
@@ -32,7 +32,7 @@ import teetime.framework.pipe.InstantiationPipe;
*/
*/
final
class
ConfigurationContext
{
final
class
ConfigurationContext
{
public
static
final
ConfigurationContext
EMPTY_CONTEXT
=
new
ConfigurationContext
(
null
);
static
final
ConfigurationContext
EMPTY_CONTEXT
=
new
ConfigurationContext
(
null
);
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
ConfigurationContext
.
class
);
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
ConfigurationContext
.
class
);
...
@@ -52,7 +52,7 @@ final class ConfigurationContext {
...
@@ -52,7 +52,7 @@ final class ConfigurationContext {
* @see AbstractCompositeStage#addThreadableStage(Stage)
* @see AbstractCompositeStage#addThreadableStage(Stage)
*/
*/
final
void
addThreadableStage
(
final
Stage
stage
,
final
String
threadName
)
{
final
void
addThreadableStage
(
final
Stage
stage
,
final
String
threadName
)
{
childFunction
(
stage
);
addChildContext
(
stage
);
threadService
.
addThreadableStage
(
stage
,
threadName
);
threadService
.
addThreadableStage
(
stage
,
threadName
);
}
}
...
@@ -69,13 +69,13 @@ final class ConfigurationContext {
...
@@ -69,13 +69,13 @@ final class ConfigurationContext {
LOGGER
.
warn
(
"Overwriting existing pipe while connecting stages "
+
LOGGER
.
warn
(
"Overwriting existing pipe while connecting stages "
+
sourcePort
.
getOwningStage
().
getId
()
+
" and "
+
targetPort
.
getOwningStage
().
getId
()
+
"."
);
sourcePort
.
getOwningStage
().
getId
()
+
" and "
+
targetPort
.
getOwningStage
().
getId
()
+
"."
);
}
}
childFunction
(
sourcePort
.
getOwningStage
());
addChildContext
(
sourcePort
.
getOwningStage
());
childFunction
(
targetPort
.
getOwningStage
());
addChildContext
(
targetPort
.
getOwningStage
());
new
InstantiationPipe
(
sourcePort
,
targetPort
,
capacity
);
new
InstantiationPipe
(
sourcePort
,
targetPort
,
capacity
);
}
}
// FIXME: Rename method
// FIXME: Rename method
final
void
childFunction
(
final
Stage
stage
)
{
final
void
addChildContext
(
final
Stage
stage
)
{
if
(!
stage
.
owningContext
.
equals
(
EMPTY_CONTEXT
))
{
if
(!
stage
.
owningContext
.
equals
(
EMPTY_CONTEXT
))
{
if
(
stage
.
owningContext
!=
this
)
{
// Performance
if
(
stage
.
owningContext
!=
this
)
{
// Performance
childs
.
add
(
stage
.
owningContext
);
childs
.
add
(
stage
.
owningContext
);
...
@@ -98,7 +98,7 @@ final class ConfigurationContext {
...
@@ -98,7 +98,7 @@ final class ConfigurationContext {
}
}
private
void
mergeContexts
(
final
ConfigurationContext
child
)
{
private
void
mergeContexts
(
final
ConfigurationContext
child
)
{
threadService
.
merge
(
child
.
get
Runtime
Service
());
threadService
.
merge
(
child
.
get
Thread
Service
());
// Finally copy parent services
// Finally copy parent services
child
.
threadService
=
this
.
threadService
;
child
.
threadService
=
this
.
threadService
;
...
@@ -116,12 +116,12 @@ final class ConfigurationContext {
...
@@ -116,12 +116,12 @@ final class ConfigurationContext {
this
.
threadService
.
onFinish
();
this
.
threadService
.
onFinish
();
}
}
public
ThreadService
get
Runtime
Service
()
{
ThreadService
get
Thread
Service
()
{
return
threadService
;
return
threadService
;
}
}
public
void
set
Runtime
Service
(
final
ThreadService
runtime
Service
)
{
void
set
Thread
Service
(
final
ThreadService
thread
Service
)
{
this
.
threadService
=
runtime
Service
;
this
.
threadService
=
thread
Service
;
}
}
}
}
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