public class PostgreSQLJournal
extends com.google.common.util.concurrent.AbstractService
implements com.eventsourcing.Journal
| Modifier and Type | Field and Description |
|---|---|
protected DataSourceProvider |
dataSourceProvider |
| Constructor and Description |
|---|
PostgreSQLJournal() |
PostgreSQLJournal(com.impossibl.postgres.jdbc.PGDataSource dataSource) |
PostgreSQLJournal(com.impossibl.postgres.jdbc.PGDataSource dataSource,
com.zaxxer.hikari.HikariConfig hikariConfig) |
| Modifier and Type | Method and Description |
|---|---|
com.eventsourcing.Journal.Transaction |
beginTransaction() |
void |
clear() |
<T extends com.eventsourcing.Command<?,?>> |
commandIterator(java.lang.Class<T> klass) |
protected static java.lang.String |
defineColumns(java.sql.Connection connection,
com.eventsourcing.layout.Layout<?> layout) |
protected void |
doStart() |
protected void |
doStop() |
<T extends com.eventsourcing.Event> |
eventIterator(java.lang.Class<T> klass) |
<T extends com.eventsourcing.Entity> |
get(java.util.UUID uuid) |
com.eventsourcing.Repository |
getRepository() |
<T extends com.eventsourcing.Entity> |
isEmpty(java.lang.Class<T> klass) |
<S,T> com.eventsourcing.Command<S,T> |
journal(com.eventsourcing.Journal.Transaction tx,
com.eventsourcing.Command<S,T> command) |
com.eventsourcing.Event |
journal(com.eventsourcing.Journal.Transaction tx,
com.eventsourcing.Event event) |
void |
onCommandsAdded(java.util.Set<java.lang.Class<? extends com.eventsourcing.Command>> commands) |
void |
onEventsAdded(java.util.Set<java.lang.Class<? extends com.eventsourcing.Event>> events) |
void |
setRepository(com.eventsourcing.Repository repository) |
<T extends com.eventsourcing.Entity> |
size(java.lang.Class<T> klass) |
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toStringprotected DataSourceProvider dataSourceProvider
public PostgreSQLJournal()
public PostgreSQLJournal(com.impossibl.postgres.jdbc.PGDataSource dataSource)
public PostgreSQLJournal(com.impossibl.postgres.jdbc.PGDataSource dataSource,
com.zaxxer.hikari.HikariConfig hikariConfig)
public void setRepository(com.eventsourcing.Repository repository)
setRepository in interface com.eventsourcing.Journalpublic void onCommandsAdded(java.util.Set<java.lang.Class<? extends com.eventsourcing.Command>> commands)
onCommandsAdded in interface com.eventsourcing.Journalpublic void onEventsAdded(java.util.Set<java.lang.Class<? extends com.eventsourcing.Event>> events)
onEventsAdded in interface com.eventsourcing.Journalpublic com.eventsourcing.Journal.Transaction beginTransaction()
beginTransaction in interface com.eventsourcing.Journalpublic <S,T> com.eventsourcing.Command<S,T> journal(com.eventsourcing.Journal.Transaction tx,
com.eventsourcing.Command<S,T> command)
journal in interface com.eventsourcing.Journalpublic com.eventsourcing.Event journal(com.eventsourcing.Journal.Transaction tx,
com.eventsourcing.Event event)
journal in interface com.eventsourcing.Journalpublic <T extends com.eventsourcing.Entity> java.util.Optional<T> get(java.util.UUID uuid)
get in interface com.eventsourcing.Journalpublic <T extends com.eventsourcing.Command<?,?>> com.googlecode.cqengine.index.support.CloseableIterator<com.eventsourcing.EntityHandle<T>> commandIterator(java.lang.Class<T> klass)
commandIterator in interface com.eventsourcing.Journalpublic <T extends com.eventsourcing.Event> com.googlecode.cqengine.index.support.CloseableIterator<com.eventsourcing.EntityHandle<T>> eventIterator(java.lang.Class<T> klass)
eventIterator in interface com.eventsourcing.Journalpublic void clear()
clear in interface com.eventsourcing.Journalpublic <T extends com.eventsourcing.Entity> long size(java.lang.Class<T> klass)
size in interface com.eventsourcing.Journalpublic <T extends com.eventsourcing.Entity> boolean isEmpty(java.lang.Class<T> klass)
isEmpty in interface com.eventsourcing.Journalprotected void doStart()
doStart in class com.google.common.util.concurrent.AbstractServiceprotected void doStop()
doStop in class com.google.common.util.concurrent.AbstractServiceprotected static java.lang.String defineColumns(java.sql.Connection connection,
com.eventsourcing.layout.Layout<?> layout)
@Generated(value="lombok") public com.eventsourcing.Repository getRepository()
getRepository in interface com.eventsourcing.Journal