Package org.akubraproject

Examples of org.akubraproject.DuplicateBlobException


          "WildcastFSBlob cannot be written.");
    }
    ensureOpen();

    if (!overwrite && file.exists())
      throw new DuplicateBlobException(getId());

    makeParentDirs(file);

    if (modified != null)
      modified.add(file);
View Full Code Here


    WildcardFSBlob dest = (WildcardFSBlob) getConnection().getBlob(blobId,
        hints);

    File other = dest.file;
    if (other.exists())
      throw new DuplicateBlobException(blobId);

    makeParentDirs(other);

    if (!file.renameTo(other)) {
      if (!file.exists())
View Full Code Here

  @Override
  public OutputStream openOutputStream(long estimatedSize, boolean overwrite) throws IOException {
    ensureOpen();

    if (!overwrite && file.exists())
      throw new DuplicateBlobException(getId());

    makeParentDirs(file);

    if (modified != null)
      modified.add(file);
View Full Code Here

    FSBlob dest = (FSBlob) getConnection().getBlob(blobId, hints);

    File other = dest.file;
    if (other.exists())
      throw new DuplicateBlobException(blobId);

    makeParentDirs(other);

    if (!file.renameTo(other)) {
      if (!file.exists())
View Full Code Here

      throws DuplicateBlobException, IOException, MissingBlobException {
    if (logger.isDebugEnabled())
      logger.debug("renaming blob '" + oldBlobId + "' to '" + newBlobId + "' (" + this + ")");

    if (getRealId(newBlobId) != null)
      throw new DuplicateBlobException(newBlobId);

    remNameEntry(oldBlobId, storeId);
    addNameEntry(newBlobId, storeId);
  }
View Full Code Here

        throws IllegalStateException, MissingBlobException, DuplicateBlobException {
      ensureOpen();
      if (mustExist && storeId == null)
        throw new MissingBlobException(getId());
      if (mustNotExist && storeId != null)
        throw new DuplicateBlobException(getId());
    }
View Full Code Here

    MemBlob dest = (MemBlob)getConnection().getBlob(blobId, hints);

    synchronized (blobs) {
      if (dest.exists())
        throw new DuplicateBlobException(blobId, "Destination blob already exists");

      MemData data = blobs.remove(id);
      if (data == null)
        throw new MissingBlobException(getId());
View Full Code Here

    MemData data;

    synchronized (blobs) {
      data = blobs.get(id);
      if (!overwrite && data != null)
        throw new DuplicateBlobException(getId(), "Blob already exists");

      if (data == null || estimatedSize > data.bufferSize()) {
        data = new MemData(Math.max((int) Math.min(estimatedSize, Integer.MAX_VALUE), 1024));
        blobs.put(id, data);
      } else {
View Full Code Here

TOP

Related Classes of org.akubraproject.DuplicateBlobException

Copyright © 2018 www.massapicom. 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.