Example #1
0
 /** 1. 从Number中继承过来的几个方法, 并实现了它。 */
 public void testValue() {
   AtomicInteger ai = new AtomicInteger(22);
   System.out.println(ai.byteValue());
   System.out.println(ai.shortValue());
   System.out.println(ai.intValue());
   System.out.println(ai.longValue());
   System.out.println(ai.floatValue());
   System.out.println(ai.doubleValue());
 }
  public void testAdd() throws Exception {
    getIdentitiesOfFiles();

    fillFilesWithContent();

    validateFilesContent(version.byteValue());

    version.compareAndSet(1, 2);
    continuousWrite.compareAndSet(true, false);

    generateRemainingPagesQueueForAllFiles();

    executeConcurrentRandomReadAndWriteOperations();

    buffer.flushBuffer();

    validateFilesContent(version.byteValue());
  }