Package org.apache.flume.channel.recoverable.memory.wal

Examples of org.apache.flume.channel.recoverable.memory.wal.SequenceIDBuffer.swap()


  @Test
  public void testSwap() {
    SequenceIDBuffer buffer = new SequenceIDBuffer(2);
    buffer.put(0, Long.MAX_VALUE);
    buffer.put(1, Long.MIN_VALUE);
    buffer.swap(0, 1);
    Assert.assertEquals(buffer.get(0), Long.MIN_VALUE);
    Assert.assertEquals(buffer.get(1), Long.MAX_VALUE);
  }
}
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.