Examples of Lock


Examples of info.aduna.concurrent.locks.Lock

  @Override
  public void commit()
    throws StoreException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      Lock txnLock = getTransactionLock();
      try {
        super.commit();
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

Examples of info.aduna.concurrent.locks.Lock

  @Override
  public void rollback()
    throws StoreException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      Lock txnLock = getTransactionLock();
      try {
        super.rollback();
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

Examples of info.aduna.concurrent.locks.Lock

  @Override
  public void addStatement(Resource subj, URI pred, Value obj, Resource... contexts)
    throws StoreException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      Lock txnLock = getTransactionLock();
      try {
        super.addStatement(subj, pred, obj, contexts);
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

Examples of info.aduna.concurrent.locks.Lock

  @Override
  public void removeStatements(Resource subj, URI pred, Value obj, Resource... contexts)
    throws StoreException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      Lock txnLock = getTransactionLock();
      try {
        super.removeStatements(subj, pred, obj, contexts);
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

Examples of info.aduna.concurrent.locks.Lock

  @Override
  public Cursor<? extends Namespace> getNamespaces()
    throws StoreException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      return super.getNamespaces();
    }
    finally {
      conLock.release();
    }
  }
View Full Code Here

Examples of info.aduna.concurrent.locks.Lock

  @Override
  public String getNamespace(String prefix)
    throws StoreException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      return super.getNamespace(prefix);
    }
    finally {
      conLock.release();
    }
  }
View Full Code Here

Examples of info.aduna.concurrent.locks.Lock

  @Override
  public void setNamespace(String prefix, String name)
    throws StoreException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      Lock txnLock = getTransactionLock();
      try {
        super.setNamespace(prefix, name);
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

Examples of info.aduna.concurrent.locks.Lock

  @Override
  public void removeNamespace(String prefix)
    throws StoreException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      Lock txnLock = getTransactionLock();
      try {
        super.removeNamespace(prefix);
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

Examples of info.aduna.concurrent.locks.Lock

  @Override
  public void clearNamespaces()
    throws StoreException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      Lock txnLock = getTransactionLock();
      try {
        super.clearNamespaces();
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

Examples of io.vertx.core.shareddata.Lock

  @Test
  public void testAcquire() {
    getVertx().sharedData().getLock("foo", ar -> {
      assertTrue(ar.succeeded());
      long start = System.currentTimeMillis();
      Lock lock = ar.result();
      vertx.setTimer(1000, tid -> {
        lock.release();
      });
      getVertx().sharedData().getLock("foo", ar2 -> {
        assertTrue(ar2.succeeded());
        // Should be delayed
        assertTrue(System.currentTimeMillis() - start >= 1000);
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.