Package org.sonatype.nexus.proxy.item

Examples of org.sonatype.nexus.proxy.item.RepositoryItemUidLock.unlock()


          throw new LocalStorageException("Could not get the content of source file (is it file?)!", e);
        }
      }
    }
    finally {
      toUidLock.unlock();

      fromUidLock.unlock();
    }
  }
View Full Code Here


        doDeleteItem(request);
      }
    }
    finally {
      uidLock.unlock();
    }
  }

  /**
   * Decides should a {@link ItemNotFoundException} be neglected on
View Full Code Here

      try {
        // store it
        getLocalStorage().storeItem(this, item);
      }
      finally {
        uidLock.unlock();
      }
    }
    finally {
      uidUploaderLock.unlock();
    }
View Full Code Here

      catch (Exception e) {
        Throwables.propagate(e);
      }
    }
    finally {
      lock.unlock();
    }
    return null; // to make compiler happy. but is unreachable
  }

  protected StorageFileItem getFileItem()
View Full Code Here

        // until being fully read
        result = doRetrieveLocalItem(item.getResourceStoreRequest());

      }
      finally {
        itemLock.unlock();
      }

      result.getItemContext().setParentContext(item.getItemContext());

      if (Action.create.equals(action)) {
View Full Code Here

          // this whole method happens with exclusive lock on UID
          return doRetrieveItem0(request, localItem);
        }
        finally {
          itemUidLock.unlock();
        }
      }
    }
    finally {
      itemUidLock.unlock();
View Full Code Here

          itemUidLock.unlock();
        }
      }
    }
    finally {
      itemUidLock.unlock();
    }
  }

  protected void shouldTryRemote(final ResourceStoreRequest request)
      throws IllegalOperationException, ItemNotFoundException
View Full Code Here

      throw new ItemNotFoundException(reasonFor(request, this,
          "Path %s fetched from remote storage of %s but failed validation.", request.getRequestPath(),
          this));
    }
    finally {
      itemUidLock.unlock();
    }
  }

  protected List<String> getRemoteUrls(final ResourceStoreRequest request) {
    return Lists.newArrayList(getRemoteUrl());
View Full Code Here

      // and finally: index it
      getNexusIndexer().addArtifactToIndex(ac, context);
    }
    finally {
      uidLock.unlock();
    }
  }

  public void removeItemFromIndex(final Repository repository, final StorageItem item)
      throws IOException
View Full Code Here

      try {
        getNexusIndexer().deleteArtifactFromIndex(ac, context);
      }
      finally {
        uidLock.unlock();
      }
    }
    else {
      // do NOT remove file from index
      if (log.isDebugEnabled()) {
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.