Java Code Examples for akka.event.Logging#getLogger()

The following examples show how to use akka.event.Logging#getLogger() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SearchRootActor.java    From ditto with Eclipse Public License 2.0 5 votes vote down vote up
@SuppressWarnings("unused")
private SearchRootActor(final SearchConfig searchConfig, final ActorRef pubSubMediator,
        final ActorMaterializer materializer) {

    log = Logging.getLogger(getContext().system(), this);

    final MongoDbConfig mongoDbConfig = searchConfig.getMongoDbConfig();
    final MongoDbConfig.MonitoringConfig monitoringConfig = mongoDbConfig.getMonitoringConfig();

    final DittoMongoClient mongoDbClient = MongoClientWrapper.getBuilder(mongoDbConfig)
            .addCommandListener(getCommandListenerOrNull(monitoringConfig))
            .addConnectionPoolListener(getConnectionPoolListenerOrNull(monitoringConfig))
            .build();

    final ThingsSearchPersistence thingsSearchPersistence = getThingsSearchPersistence(searchConfig, mongoDbClient);
    final ActorRef searchActor = initializeSearchActor(searchConfig.getLimitsConfig(), thingsSearchPersistence);
    pubSubMediator.tell(DistPubSubAccess.put(searchActor), getSelf());

    final TimestampPersistence backgroundSyncPersistence =
            MongoTimestampPersistence.initializedInstance(BACKGROUND_SYNC_COLLECTION_NAME, mongoDbClient,
                    materializer);

    final ActorRef searchUpdaterRootActor = startChildActor(SearchUpdaterRootActor.ACTOR_NAME,
            SearchUpdaterRootActor.props(searchConfig, pubSubMediator, materializer, thingsSearchPersistence,
                    backgroundSyncPersistence));
    final ActorRef healthCheckingActor = initializeHealthCheckActor(searchConfig, searchUpdaterRootActor);

    createHealthCheckingActorHttpBinding(searchConfig.getHttpConfig(), healthCheckingActor, materializer);
}
 
Example 2
Source File: MongoThingsSearchPersistence.java    From ditto with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Initializes the things search persistence with a passed in {@code persistence}.
 *
 * @param mongoClient the mongoDB persistence wrapper.
 * @param actorSystem the Akka ActorSystem.
 * @since 1.0.0
 */
public MongoThingsSearchPersistence(final DittoMongoClient mongoClient, final ActorSystem actorSystem) {
    final MongoDatabase database = mongoClient.getDefaultDatabase();
    // configure search persistence to stress the primary as little as possible and tolerate inconsistency
    collection = database
            .getCollection(PersistenceConstants.THINGS_COLLECTION_NAME)
            .withReadPreference(ReadPreference.secondaryPreferred());

    log = Logging.getLogger(actorSystem, getClass());
    final ActorMaterializer materializer = ActorMaterializer.create(actorSystem);
    indexInitializer = IndexInitializer.of(database, materializer);
    maxQueryTime = mongoClient.getDittoSettings().getMaxQueryTime();
    hints = MongoHints.empty();
}
 
Example 3
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 4
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 5
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 6
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 7
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 8
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 9
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 10
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 11
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 12
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 13
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 14
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
    system.actorOf(printerProps(coffeeHouse));
}
 
Example 15
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 16
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 17
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 18
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 19
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
public CoffeeHouseApp(final ActorSystem system) {
    this.system = system;
    log = Logging.getLogger(system, getClass().getName());
    coffeeHouse = createCoffeeHouse();
}
 
Example 20
Source File: PolicyPersistenceActorMailbox.java    From ditto with Eclipse Public License 2.0 4 votes vote down vote up
PolicyPersistenceActorMessageQueue(final int capacity, final ActorSystem actorSystem) {
    log = Logging.getLogger(actorSystem, PolicyPersistenceActorMessageQueue.class);
    this.capacity = capacity;
}