Skip to content

Commit

Permalink
Merge pull request #161 from flame-stream/startFlameStream
Browse files Browse the repository at this point in the history
Move loading SleepingIdleStrategy to static initializer
  • Loading branch information
mrMakaronka authored Nov 14, 2018
2 parents 31cae21 + e116f21 commit b8422e2
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ public class WorkerApplication implements Runnable {
@Nullable
private ActorSystem system = null;

static {
try {
Class.forName("org.agrona.concurrent.SleepingIdleStrategy");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}

public WorkerApplication(String id, DumbInetSocketAddress host, String zkString) {
this(id, host, zkString, null);
}
Expand All @@ -45,13 +53,7 @@ public WorkerApplication(String id, DumbInetSocketAddress host, String zkString,
this.snapshotPath = snapshotPath;
}


public static void main(String... args) throws IOException {
try {
Class.forName("org.agrona.concurrent.SleepingIdleStrategy");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
final Path configPath = Paths.get(args[0]);
final ObjectMapper mapper = new ObjectMapper();
final WorkerConfig workerConfig = mapper.readValue(
Expand Down

0 comments on commit b8422e2

Please # to comment.