Package net.kuujo.copycat.internal.log

Examples of net.kuujo.copycat.internal.log.SnapshotEntry.term()


        .withRemoteMembers(new Member("bar"), new Member("baz")), "Hello world!".getBytes()));

    assertEquals(log.firstIndex(), 5);
    assertEquals(log.lastIndex(), 5);
    SnapshotEntry entry = log.getEntry(5);
    assertEquals(entry.term(), 1);
    assertEquals("Hello world!", new String(entry.data()));
  }

  public void testCompactMiddleOfLog() throws Exception {
    appendEntries();
View Full Code Here


        .withRemoteMembers(new Member("bar"), new Member("baz")), "Hello world!".getBytes()));

    assertEquals(log.firstIndex(), 3);
    assertEquals(log.lastIndex(), 5);
    SnapshotEntry entry = log.getEntry(3);
    assertEquals(entry.term(), 1);
    assertEquals("Hello world!", new String(entry.data()));
    OperationEntry entry2 = log.getEntry(4);
    assertEquals(entry2.term(), 1);
    assertEquals("bar", entry2.operation());
    OperationEntry entry3 = log.getEntry(5);
View Full Code Here

        .withRemoteMembers(new Member("bar"), new Member("baz")), "Hello world!".getBytes()));

    assertEquals(log.firstIndex(), 5);
    assertEquals(log.lastIndex(), 5);
    SnapshotEntry entry = log.getEntry(5);
    assertEquals(entry.term(), 1);
    assertEquals("Hello world!", new String(entry.data()));
  }

  public void testCompactMiddleOfLog() throws Exception {
    appendEntries();
View Full Code Here

        .withRemoteMembers(new Member("bar"), new Member("baz")), "Hello world!".getBytes()));

    assertEquals(log.firstIndex(), 3);
    assertEquals(log.lastIndex(), 5);
    SnapshotEntry entry = log.getEntry(3);
    assertEquals(entry.term(), 1);
    assertEquals("Hello world!", new String(entry.data()));
    OperationEntry entry2 = log.getEntry(4);
    assertEquals(entry2.term(), 1);
    assertEquals("bar", entry2.operation());
    OperationEntry entry3 = log.getEntry(5);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.