You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2016/05/20 11:31:23 UTC
[2/4] jena git commit: Additional debug output for initialization.
Additional debug output for initialization.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/2372a929
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/2372a929
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/2372a929
Branch: refs/heads/master
Commit: 2372a929adacccc1499e773b274a91baefbc413c
Parents: 69acadc
Author: Andy Seaborne <an...@apache.org>
Authored: Fri May 20 11:18:42 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri May 20 11:18:42 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/jena/system/JenaSystem.java | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/2372a929/jena-core/src/main/java/org/apache/jena/system/JenaSystem.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/system/JenaSystem.java b/jena-core/src/main/java/org/apache/jena/system/JenaSystem.java
index 2858bec..433a446 100644
--- a/jena-core/src/main/java/org/apache/jena/system/JenaSystem.java
+++ b/jena-core/src/main/java/org/apache/jena/system/JenaSystem.java
@@ -101,11 +101,19 @@ public class JenaSystem {
// Debug : what did we find?
if ( JenaSystem.DEBUG_INIT ) {
+ logLifecycle("Found:") ;
get().snapshot().forEach(mod->
- logLifecycle(" %s", mod.getClass().getSimpleName())) ;
+ logLifecycle(" %-20s [%d]", mod.getClass().getSimpleName(), mod.level())) ;
}
+
get().add(new JenaInitLevel0()) ;
-
+
+ if ( JenaSystem.DEBUG_INIT ) {
+ logLifecycle("Initialization sequence:") ;
+ JenaSystem.forEach( module ->
+ logLifecycle(" %-20s [%d]", module.getClass().getSimpleName(), module.level()) ) ;
+ }
+
JenaSystem.forEach( module -> {
logLifecycle("Init: %s", module.getClass().getSimpleName());
module.start() ;
@@ -176,9 +184,9 @@ public class JenaSystem {
}
// Order by level (increasing)
- private static Comparator<JenaSubsystemLifecycle> comparator = (obj1, obj2) -> Integer.compare(obj1.level(), obj2.level()) ;
+ private static Comparator<JenaSubsystemLifecycle> comparator = (obj1, obj2) -> Integer.compare(obj1.level(), obj2.level()) ;
// Order by level (decreasing)
- private static Comparator<JenaSubsystemLifecycle> reverseComparator = (obj1, obj2) -> -1 * Integer.compare(obj1.level(), obj2.level()) ;
+ private static Comparator<JenaSubsystemLifecycle> reverseComparator = (obj1, obj2) -> -1 * comparator.compare(obj1, obj2) ;
private synchronized static void forEach(Consumer<JenaSubsystemLifecycle> action, Comparator<JenaSubsystemLifecycle> ordering) {
List<JenaSubsystemLifecycle> x = get().snapshot() ;