Package com.saasovation.common.event.sourcing

Examples of com.saasovation.common.event.sourcing.EventStoreException


                    this.saveJournalSequence();

                    this.database().close();

                } catch (Throwable t) {
                    throw new EventStoreException(
                            "Cannot clsoe LevelDB database: "
                                    + this.databasePath()
                                    + " because: "
                                    + t.getMessage(),
                            t);
View Full Code Here


                this.database().delete(entry.getKey());
            }

        } catch (Throwable t) {
            throw new EventStoreException(
                    "Cannot purge journal LevelDB database: "
                        + this.databasePath()
                        + " because: "
                        + t.getMessage(),
                    t);
View Full Code Here

            if (!this.cacheJournalSequence()) {
                this.repair();
            }

        } catch (Throwable t) {
            throw new EventStoreException(
                    "Cannot open LevelDB database: "
                        + aDirectoryPath
                        + " because: "
                        + t.getMessage(),
                    t);
View Full Code Here

                aDatabase.delete(entry.getKey());
            }

        } catch (Throwable t) {
            throw new EventStoreException(
                    "Cannot purge LevelDB database: because: "
                        + t.getMessage(),
                    t);
        } finally {
            try {
View Full Code Here

                        .loggedJournalEntriesSince(aLastReceivedEvent);

            events = this.toDispatchableDomainEvents(entries);

        } catch (Throwable t) {
            throw new EventStoreException(
                    "Cannot query event store for events since: "
                        + aLastReceivedEvent
                        + " because: "
                        + t.getMessage(),
                    t);
View Full Code Here

            String streamVersion = keyProvider.lastKeyPart(entry.referenceKey());

            version = Integer.parseInt(streamVersion);

        } catch (Throwable t) {
            throw new EventStoreException(
                    "Cannot query event stream for: "
                        + anIdentity.streamName()
                        + " since version: "
                        + anIdentity.streamVersion()
                        + " because: "
                        + t.getMessage(),
                    t);
        }

        if (events.isEmpty()) {
            throw new EventStoreException(
                    "There is no such event stream: "
                    + anIdentity.streamName()
                    + " : "
                    + anIdentity.streamVersion());
        }
View Full Code Here

            connection.commit();

            return sequence;

        } catch (Throwable t) {
            throw new EventStoreException(
                    "Cannot query event for sequence since: "
                        + aLastReceivedEvent
                        + " because: "
                        + t.getMessage(),
                    t);
View Full Code Here

            result = statement.executeQuery();

            EventStream eventStream = this.buildEventStream(result);

            if (eventStream.version() == 0) {
                throw new EventStoreException(
                        "There is no such event stream: "
                        + anIdentity.streamName()
                        + " : "
                        + anIdentity.streamVersion());
            }

            connection.commit();

            return eventStream;

        } catch (Throwable t) {
            throw new EventStoreException(
                    "Cannot query event stream for: "
                        + anIdentity.streamName()
                        + " since version: "
                        + anIdentity.streamVersion()
                        + " because: "
View Full Code Here

            connection.commit();

            return this.buildEventStream(result);

        } catch (Throwable t) {
            throw new EventStoreException(
                    "Cannot query full event stream for: "
                        + anIdentity.streamName()
                        + " because: "
                        + t.getMessage(),
                    t);
View Full Code Here

            connection.createStatement().execute("delete from tbl_es_event_store");

            connection.commit();

        } catch (Throwable t) {
            throw new EventStoreException(
                    "Problem purging event store because: "
                        + t.getMessage(),
                    t);
        } finally {
            try {
View Full Code Here

TOP

Related Classes of com.saasovation.common.event.sourcing.EventStoreException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.