Examples of LockResult


Examples of org.geotools.data.wfs.v1_0_0.LockResult

                                                                       .getType()
                                                                       .getName())) {
                out = (Id) value[i++];
            }

            return new LockResult(lockId, in, out);
        }
View Full Code Here

Examples of org.jboss.as.clustering.lock.SharedLocalYieldingClusterLockManager.LockResult

        this.trace("Acquiring %slock on %s", newLock ? "new " : "", lockKey);

        long timeout = this.cache.getCacheConfiguration().locking().lockAcquisitionTimeout();
        try {
            LockResult result = this.lockManager.lock(lockKey, timeout, newLock);
            this.trace("Lock acquired (%s) on %s", result, lockKey);
            return result;
        } catch (TimeoutException e) {
            throw InfinispanEjbMessages.MESSAGES.lockAcquisitionTimeout(lockKey, timeout);
        } catch (InterruptedException e) {
View Full Code Here

Examples of org.jboss.as.clustering.lock.SharedLocalYieldingClusterLockManager.LockResult

        this.trace("Acquiring %slock on %s", newLock ? "new " : "", lockKey);

        long timeout = this.cache.getCacheConfiguration().locking().lockAcquisitionTimeout();
        try {
            LockResult result = this.lockManager.lock(lockKey, timeout, newLock);
            this.trace("Lock acquired (%s) on %s", result, lockKey);
            return result;
        } catch (TimeoutException e) {
            throw InfinispanEjbMessages.MESSAGES.lockAcquisitionTimeout(lockKey, timeout);
        } catch (InterruptedException e) {
View Full Code Here

Examples of org.jboss.as.clustering.lock.SharedLocalYieldingClusterLockManager.LockResult

            String details = "failure on lock#" + lockPosition +" newLock is #"+newLockPos;
            if (locker.exception != null) {
                throw (Exception) locker.exception;
            }

            LockResult newLockResult = locker.newLock ? LockResult.NEW_LOCK : LockResult.ACQUIRED_FROM_CLUSTER;

            if (sawNewLockResult) {
                if (locker.newLock) {
                    assertTrue("locker result ("+locker.result+") is not ALREADY_HELD or NEW_LOCK, " + details,
                        locker.result == LockResult.ALREADY_HELD || locker.result == LockResult.NEW_LOCK);
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.SharedLocalYieldingClusterLockManager.LockResult

     
      this.trace("Acquiring %slock on %s", newLock ? "new " : "", id);
     
      try
      {
         LockResult result = this.lockManager.lock(this.getBeanLockKey(id), this.cache.getConfiguration().getLockAcquisitionTimeout(), newLock);
         this.trace("Lock acquired (%s) on %s", result, id);
         return result;
      }
      catch (TimeoutException e)
      {
View Full Code Here

Examples of org.olat.core.util.coordinate.LockResult

 
 
  public LockResult acquireLock(final OLATResourceable ores, final Identity requestor, final String locksubkey) {
    final String asset = OresHelper.createStringRepresenting(ores, locksubkey);
   
    LockResult res = syncer.doInSync(ores, new SyncerCallback<LockResult>(){
      public LockResult execute() {
        ClusterLockManager cm = ClusterLockManager.getInstance();
        LockResultImpl lres;
        LockImpl li = cm.findLock(asset);
        if (li == null) { // fine, we can lock it
View Full Code Here

Examples of org.olat.core.util.coordinate.LockResult

    }
    return res;
  }
 
  public LockResult aquirePersistentLock(final OLATResourceable ores, final Identity ident, final String locksubkey) {
    LockResult res = syncer.doInSync(ores, new SyncerCallback<LockResult>(){
      public LockResult execute() {
        if (plm == null) { // lazy init because the impl is not defined in the core spring config
          plm = (PersistentLockManager) CoreSpringFactory.getBean(PersistentLockManager.class);
        }
        LockResult ares = plm.aquirePersistentLock(ores, ident, locksubkey);
        return ares;
      }
    });
    return res;
  }
View Full Code Here

Examples of org.olat.core.util.coordinate.LockResult

   * @see org.olat.core.util.locks.PersistentLockManager#aquirePersistentLock(org.olat.core.id.OLATResourceable,
   *      org.olat.core.id.Identity, java.lang.String)
   */
  public LockResult aquirePersistentLock(OLATResourceable ores, Identity ident, String locksubkey) {
    //synchronisation is solved in the LockManager
    LockResult lres;
    PropertyManager pm = PropertyManager.getInstance();
    String derivedLockString = OresHelper.createStringRepresenting(ores, locksubkey);
    long aqTime;
    Identity lockOwner;
    boolean success;
View Full Code Here

Examples of org.olat.core.util.coordinate.LockResult

    String repositorySoftkey = (String) moduleConfiguration.get(IQEditController.CONFIG_KEY_REPOSITORY_SOFTKEY);
    RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(repositorySoftkey, true);
    if (CoordinatorManager.getCoordinator().getLocker().isLocked(re.getOlatResource(), null)){
      Translator translator = Util.createPackageTranslator(this.getClass(), ureq.getLocale());
      //so this resource is locked, let's find out who locked it
      LockResult lockResult = CoordinatorManager.getCoordinator().getLocker().acquireLock(re.getOlatResource(), ureq.getIdentity(), null);
      return MessageUIFactory.createInfoMessage(ureq, wControl, translator.translate("status.currently.locked.title"),
          translator.translate("status.currently.locked", new String[] {lockResult.getOwner().getName()}));
    }else{
      ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrap(re, OlatResourceableType.iq));
      return new IQDisplayController(moduleConfiguration, secCallback, ureq, wControl, callingResId, callingResDetail);
    }
  }
View Full Code Here

Examples of org.olat.core.util.coordinate.LockResult

   */
  public LockResult acquireLock(OLATResourceable feed, Identity identity) {
    // OLATResourceable itemLock =
    // OresHelper.createOLATResourceableInstance("podcastlock_" +
    // feed.getResourceableId() + "_meta", item.getId())
    LockResult lockResult = CoordinatorManager.getCoordinator().getLocker().acquireLock(feed, identity, null);
    return lockResult;
  }
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.