Package mil.nga.giat.geowave.vector.plugin.lock

Examples of mil.nga.giat.geowave.vector.plugin.lock.LockingManagement.lock()


      throws InterruptedException,
      IOException {
    final LockingManagement memoryLockManager = new MemoryLockManager(
        "default");
    final DefaultTransaction t1 = new DefaultTransaction();
    memoryLockManager.lock(
        t1,
        "f1");
    final DefaultTransaction t2 = new DefaultTransaction();

    Thread commiter = new Thread(
View Full Code Here


    long currentTime = System.currentTimeMillis();
    commiter.start();
    // will block\
  //  System.out.println("t2");
    memoryLockManager.lock(
        t2,
        "f1");
    assertTrue((System.currentTimeMillis() - currentTime) >= 4000);

    commiter.join();
View Full Code Here

      throws InterruptedException,
      IOException {
    final LockingManagement memoryLockManager = new MemoryLockManager(
        "default");
    final DefaultTransaction t1 = new DefaultTransaction();
    memoryLockManager.lock(
        t1,
        "f1");
    memoryLockManager.lock(
        t1,
        "f1");
View Full Code Here

        "default");
    final DefaultTransaction t1 = new DefaultTransaction();
    memoryLockManager.lock(
        t1,
        "f1");
    memoryLockManager.lock(
        t1,
        "f1");
    t1.commit();
    t1.close();
  }
View Full Code Here

            }
          }
        });
    long currentTime = System.currentTimeMillis();
    commiter.start();
    memoryLockManager.lock(
        t2,
        "f1");
    assertTrue((System.currentTimeMillis() - currentTime) < 4000);
    commiter.join();
  }
View Full Code Here

    memoryLockManager.lockFeatureID(
        "sometime",
        "f1",
        t1,
        lock);
    memoryLockManager.lock(
        t2,
        "f1");
    t2.commit();
    // commit should not take away the lock
    assertTrue(memoryLockManager.exists("auth1"));
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.