projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup: Coding style fixes to the Java agent
[lttng-ust.git]
/
liblttng-ust-java-agent
/
java
/
org
/
lttng
/
ust
/
agent
/
LTTngAgent.java
diff --git
a/liblttng-ust-java-agent/java/org/lttng/ust/agent/LTTngAgent.java
b/liblttng-ust-java-agent/java/org/lttng/ust/agent/LTTngAgent.java
index 8dc329fb9dfc6e1069749f353b79f9edcf0f52da..ca7bc777fa24b1042acf3d41bbd27fcc4e73a547 100644
(file)
--- a/
liblttng-ust-java-agent/java/org/lttng/ust/agent/LTTngAgent.java
+++ b/
liblttng-ust-java-agent/java/org/lttng/ust/agent/LTTngAgent.java
@@
-23,6
+23,7
@@
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
public class LTTngAgent {
import java.util.concurrent.TimeUnit;
public class LTTngAgent {
+
/* Domains */
static enum Domain {
JUL(3), LOG4J(4);
/* Domains */
static enum Domain {
JUL(3), LOG4J(4);
@@
-37,6
+38,8
@@
public class LTTngAgent {
}
}
}
}
+ private static final int SEM_TIMEOUT = 3; /* Seconds */
+
private static LogFramework julUser;
private static LogFramework julRoot;
private static LogFramework log4jUser;
private static LogFramework julUser;
private static LogFramework julRoot;
private static LogFramework log4jUser;
@@
-63,7
+66,6
@@
public class LTTngAgent {
private static boolean initialized = false;
private static Semaphore registerSem;
private static boolean initialized = false;
private static Semaphore registerSem;
- private final static int semTimeout = 3; /* Seconds */
/*
* Constructor is private. This is a singleton and a reference should be
/*
* Constructor is private. This is a singleton and a reference should be
@@
-142,8
+144,8
@@
public class LTTngAgent {
private void initAgentJULClasses() {
try {
Class<?> lttngJUL = loadClass("org.lttng.ust.agent.jul.LTTngJUL");
private void initAgentJULClasses() {
try {
Class<?> lttngJUL = loadClass("org.lttng.ust.agent.jul.LTTngJUL");
- julUser = (LogFramework)
lttngJUL.getDeclaredConstructor(new Class[] {Boolean.class
}).newInstance(false);
- julRoot = (LogFramework)
lttngJUL.getDeclaredConstructor(new Class[] {Boolean.class
}).newInstance(true);
+ julUser = (LogFramework)
lttngJUL.getDeclaredConstructor(new Class[] { Boolean.class
}).newInstance(false);
+ julRoot = (LogFramework)
lttngJUL.getDeclaredConstructor(new Class[] { Boolean.class
}).newInstance(true);
this.useJUL = true;
} catch (ClassNotFoundException e) {
/* LTTng JUL classes not found, no need to create the relevant objects */
this.useJUL = true;
} catch (ClassNotFoundException e) {
/* LTTng JUL classes not found, no need to create the relevant objects */
@@
-212,7
+214,7
@@
public class LTTngAgent {
/* Wait for each registration to end. */
try {
registerSem.tryAcquire(numThreads,
/* Wait for each registration to end. */
try {
registerSem.tryAcquire(numThreads,
-
semTimeout
,
+
SEM_TIMEOUT
,
TimeUnit.SECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
TimeUnit.SECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
This page took
0.023464 seconds
and
4
git commands to generate.