io.vlingo.symbio.BaseEntry.TextEntry Java Examples
The following examples show how to use
io.vlingo.symbio.BaseEntry.TextEntry.
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: InMemoryStateStoreEntryReaderActorTest.java From vlingo-symbio with Mozilla Public License 2.0 | 6 votes |
@Test public void testThatEntryReaderReadsOne() { final AccessSafely access = interest.afterCompleting(3); dispatcher.afterCompleting(0); store.write(Id1, new Entity1(Id1, 10), 1, Arrays.asList(new Event1()), interest); store.write(Id2, new Entity2(Id2, "20"), 1, Arrays.asList(new Event2()), interest); store.write(Id3, new Entity1(Id3, 30), 1, Arrays.asList(new Event3()), interest); assertEquals(new Event1(), access.readFrom("sources")); assertEquals(new Event2(), access.readFrom("sources")); assertEquals(new Event3(), access.readFrom("sources")); final TextEntry entry1 = reader.readNext().await(); assertEquals(entryAdapterProvider.asEntry(new Event1(), 1, Metadata.nullMetadata()).withId("0"), entry1); final TextEntry entry2 = reader.readNext().await(); assertEquals(entryAdapterProvider.asEntry(new Event2(), 1, Metadata.nullMetadata()).withId("1"), entry2); final TextEntry entry3 = reader.readNext().await(); assertEquals(entryAdapterProvider.asEntry(new Event3(), 1, Metadata.nullMetadata()).withId("2"), entry3); reader.rewind(); assertEquals(Arrays.asList(entry1, entry2, entry3), reader.readNext(3).await()); }
Example #2
Source File: CounterQueryActor.java From vlingo-examples with Mozilla Public License 2.0 | 5 votes |
@SuppressWarnings("unchecked") public CounterQueryActor(JournalReader<TextEntry> streamReader, EntryAdapterProvider entryAdapterProvider) { this.streamReader = streamReader; this.entryAdapterProvider = entryAdapterProvider; this.cancellable = scheduler().schedule(selfAs(Scheduled.class), null, 0, 5); this.currentCount = Optional.empty(); intervalSignal(null, null); }
Example #3
Source File: CounterDecreasedAdapter.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final CounterDecreased source, final int version, final String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, CounterIncreased.class, 1, serialization, version, metadata); }
Example #4
Source File: CounterDecreasedAdapter.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public CounterDecreased fromEntry(final TextEntry entry) { return JsonSerialization.deserialized(entry.entryData(), CounterDecreased.class); }
Example #5
Source File: CounterDecreasedAdapter.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final CounterDecreased source, final Metadata metadata) { return toEntry(source, source.uuid.toString(), metadata); }
Example #6
Source File: EntryAdapters.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DoStepFive source, final int version, final String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, DoStepFive.class, 1, serialization, version, metadata); }
Example #7
Source File: EntryAdapters.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DiscussionTopicChanged source, final String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, DiscussionTopicChanged.class, 1, serialization, metadata); }
Example #8
Source File: EntryAdapters.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DoStepFour source, final int version, final String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, DoStepFour.class, 1, serialization, version, metadata); }
Example #9
Source File: EntryAdapters.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DoStepFour source, final String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, DoStepFour.class, 1, serialization, metadata); }
Example #10
Source File: EntryAdapters.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DoStepFour source, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(DoStepFour.class, 1, serialization, metadata); }
Example #11
Source File: EntryAdapters.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final ForumReopened source, final int version, String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, ForumReopened.class, 1, serialization, version, metadata); }
Example #12
Source File: EntryAdapters.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DoStepOne source, final String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, DoStepOne.class, 1, serialization, metadata); }
Example #13
Source File: EntryAdapters.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DoStepOne source, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(DoStepOne.class, 1, serialization, metadata); }
Example #14
Source File: EntryAdapters.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public DoStepOne fromEntry(final TextEntry entry) { return JsonSerialization.deserialized(entry.entryData(), DoStepOne.class); }
Example #15
Source File: DoCommand1Adapter.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(DoCommand1 source, int version, String id, Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, DoCommand1.class, 1, serialization, version, metadata); }
Example #16
Source File: DoCommand1Adapter.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DoCommand1 source, final String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, DoCommand1.class, 1, serialization, metadata); }
Example #17
Source File: DoCommand1Adapter.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DoCommand1 source, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(DoCommand1.class, 1, serialization, metadata); }
Example #18
Source File: EntryAdapters.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public PostedToDiscussion fromEntry(final TextEntry entry) { return JsonSerialization.deserialized(entry.entryData(), PostedToDiscussion.class); }
Example #19
Source File: EntryAdapters.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public ForumDescribed fromEntry(final TextEntry entry) { return JsonSerialization.deserialized(entry.entryData(), ForumDescribed.class); }
Example #20
Source File: Test2HappenedAdapter.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final Test2Happened source, final String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, Test2Happened.class, 1, serialization, metadata); }
Example #21
Source File: EntryAdapters.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DiscussionTopicChanged source, final int version, String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, DiscussionTopicChanged.class, 1, serialization, version, metadata); }
Example #22
Source File: Test2HappenedAdapter.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public Test2Happened fromEntry(final TextEntry entry) { return JsonSerialization.deserialized(entry.entryData(), Test2Happened.class); }
Example #23
Source File: Test1HappenedAdapter.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(Test1Happened source, int version, String id, Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, Test1Happened.class, 1, serialization, version, metadata); }
Example #24
Source File: EntryAdapters.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final ForumTopicChanged source, final int version, String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, ForumTopicChanged.class, 1, serialization, version, metadata); }
Example #25
Source File: Test1HappenedAdapter.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final Test1Happened source, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(Test1Happened.class, 1, serialization, metadata); }
Example #26
Source File: EntryAdapters.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final ForumStarted source, final int version, String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, ForumStarted.class, 1, serialization, version, metadata); }
Example #27
Source File: EntryAdapters.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DiscussionClosed source, final int version, String id, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(id, DiscussionClosed.class, 1, serialization, version, metadata); }
Example #28
Source File: EntryAdapters.java From vlingo-examples with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final ForumClosed source, final Metadata metadata) { return toEntry(source, source.forumId, metadata); }
Example #29
Source File: DoCommand3Adapter.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public TextEntry toEntry(final DoCommand3 source, final Metadata metadata) { final String serialization = JsonSerialization.serialized(source); return new TextEntry(DoCommand3.class, 1, serialization, metadata); }
Example #30
Source File: DoCommand3Adapter.java From vlingo-lattice with Mozilla Public License 2.0 | 4 votes |
@Override public DoCommand3 fromEntry(final TextEntry entry) { return JsonSerialization.deserialized(entry.entryData(), DoCommand3.class); }