private ContentStore newAnonymousContentStoreImpl(int maxRetries) { return new ContentStoreImpl(baseURL, StorageProviderType.UNKNOWN, null, false, getRestHelper(), maxRetries); }
private String buildBitIntegrityReportURL(String spaceId) { String url = buildURL("/bit-integrity/" + spaceId); url = addStoreIdQueryParameter(url); return url; }
/** * {@inheritDoc} */ @Override public Content getContent(final String spaceId, final String contentId) throws ContentStoreException { return getContent(spaceId, contentId, 0l, null); }
private void createSpace(String spaceId) { try { contentStore.createSpace(spaceId); } catch (ContentStoreException e) { // do nothing. } }
protected ContentStore newContentStoreImpl(StorageAccount acct) { return new ContentStoreImpl(baseURL, acct.getType(), acct.getId(), isWritable(acct), getRestHelper()); }
/** * {@inheritDoc} */ @Override public Iterator<String> getSpaceContents(String spaceId) throws ContentStoreException { return getSpaceContents(spaceId, null); }
/** * {@inheritDoc} */ public ContentStore getContentStore(String storeID) throws ContentStoreException { return getContentStore(storeID, -1); // Use default retries }
@Override public Iterator<String> retry() throws ContentStoreException { // The actual method being executed return new ContentIterator(store, spaceId, prefix); } });
/** * {@inheritDoc} */ public Map<String, ContentStore> getContentStores() throws ContentStoreException { return getContentStores(-1); // Use default retries }
/** * {@inheritDoc} */ public ContentStore getPrimaryContentStoreAsAnonymous(int maxRetries) throws ContentStoreException { return newAnonymousContentStoreImpl(maxRetries); }
/** * {@inheritDoc} */ @Override public String performTaskWithNoRetries(final String taskName, final String taskParameters) throws ContentStoreException { return doPerformTask(taskName, taskParameters); }
/** * <p>Constructor for ContentStoreManagerImpl.</p> * * @param host the host name on which DuraStore can be accessed * @param port the port on which DuraStore can be accessed * @param context the application context by which DuraStore can be accessed * @param socketTimeoutMs The socket timeout in milliseconds. A value less than zero indicates no timeout. */ public ContentStoreManagerImpl(String host, String port, String context, int socketTimeoutMs) { init(host, port, context); this.socketTimeoutMs = socketTimeoutMs; }
/** * {@inheritDoc} */ public ContentStore getPrimaryContentStore() throws ContentStoreException { return getPrimaryContentStore(-1); // Use default retries }
/** * {@inheritDoc} */ @Override public boolean contentExists(String spaceId, String contentId) throws ContentStoreException { try { doGetContentProperties(spaceId, contentId); return true; } catch (NotFoundException e) { return false; } }
@Override public int read(byte[] b) throws IOException { return read(b, 0, b.length); }
protected ContentStore newContentStoreImpl(StorageAccount acct, int maxRetries) { return new ContentStoreImpl(baseURL, acct.getType(), acct.getId(), isWritable(acct), getRestHelper(), maxRetries); }
private String buildAuditLogURL(String spaceId) { String url = buildURL("/audit/" + spaceId); url = addStoreIdQueryParameter(url); return url; }
private ContentStore newAnonymousContentStoreImpl() { return new ContentStoreImpl(baseURL, StorageProviderType.UNKNOWN, null, false, getRestHelper()); }
private String buildSpaceURL(String spaceId) { String url = buildURL("/" + spaceId); return addStoreIdQueryParameter(url); }
private String buildAclURL(String spaceId) { String url = buildURL("/acl/" + spaceId); return addStoreIdQueryParameter(url); }