Search in sources :

Example 6 with IncomingBlob

use of com.zimbra.cs.store.IncomingBlob in project zm-mailbox by Zimbra.

the class StoreManagerBasedTempBlobStore method deleteIncoming.

// BlobStore API
@Override
public void deleteIncoming(IncomingBlob ib) {
    IncomingBlob myIb = ib;
    synchronized (incomingBlobs) {
        IncomingBlob existingBlob = incomingBlobs.remove(myIb.getId());
        assert existingBlob == null || existingBlob == myIb : "Wrong blob removed: " + myIb.getId();
    }
    myIb.cancel();
}
Also used : IncomingBlob(com.zimbra.cs.store.IncomingBlob)

Example 7 with IncomingBlob

use of com.zimbra.cs.store.IncomingBlob in project zm-mailbox by Zimbra.

the class PatchStore method createIncomingPatch.

/**
     * Creates the incoming patch.
     *
     * @param accountId The if of the account to associate the patch with.
     *
     * @return IncomingPatch instance.
     *
     * @throws IOException Signals that an I/O exception has occurred.
     * @throws ServiceException the service exception
     */
public IncomingPatch createIncomingPatch(String accountId) throws IOException, ServiceException {
    IncomingBlob ib = blobStore.createIncoming(null);
    IncomingPatch ip = new IncomingPatch(ib, accountId);
    ib.setContext(ip);
    return ip;
}
Also used : IncomingBlob(com.zimbra.cs.store.IncomingBlob)

Aggregations

IncomingBlob (com.zimbra.cs.store.IncomingBlob)7 IOException (java.io.IOException)3 Blob (com.zimbra.cs.store.Blob)2 StoreManager (com.zimbra.cs.store.StoreManager)2 FileOutputStream (java.io.FileOutputStream)2 OutputStream (java.io.OutputStream)2 Random (java.util.Random)2 Test (org.junit.Test)2 Mailbox (com.zimbra.cs.mailbox.Mailbox)1 StoredBlob (com.zimbra.cs.octosync.store.BlobStore.StoredBlob)1 MailboxBlob (com.zimbra.cs.store.MailboxBlob)1 StagedBlob (com.zimbra.cs.store.StagedBlob)1