+per #16541 initial version of the Persistence Query module
This commit is contained in:
parent
09aff42d40
commit
f849793f36
23 changed files with 1051 additions and 14 deletions
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
|
||||
*/
|
||||
|
||||
package akka.persistence.query;
|
||||
|
||||
import akka.actor.ActorSystem;
|
||||
import akka.persistence.query.javadsl.ReadJournal;
|
||||
import akka.testkit.AkkaJUnitActorSystemResource;
|
||||
import org.junit.ClassRule;
|
||||
import scala.runtime.BoxedUnit;
|
||||
|
||||
public class PersistenceQueryTest {
|
||||
|
||||
@ClassRule
|
||||
public static AkkaJUnitActorSystemResource actorSystemResource =
|
||||
new AkkaJUnitActorSystemResource(PersistenceQueryTest.class.getName());
|
||||
|
||||
private final ActorSystem system = actorSystemResource.getSystem();
|
||||
|
||||
private final Hint hint = NoRefresh.getInstance();
|
||||
|
||||
// compile-only test
|
||||
@SuppressWarnings("unused")
|
||||
public void shouldExposeJavaDSLFriendlyQueryJournal() throws Exception {
|
||||
final ReadJournal readJournal = PersistenceQuery.get(system).getReadJournalFor("noop-journal");
|
||||
final akka.stream.javadsl.Source<EventEnvelope, BoxedUnit> tag = readJournal.query(new EventsByTag("tag", 0L), hint, hint); // java varargs
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue