|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + * or more contributor license agreements. See the NOTICE file |
| 4 | + * distributed with this work for additional information |
| 5 | + * regarding copyright ownership. The ASF licenses this file |
| 6 | + * to you under the Apache License, Version 2.0 (the |
| 7 | + * "License"); you may not use this file except in compliance |
| 8 | + * with the License. You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, |
| 13 | + * software distributed under the License is distributed on an |
| 14 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + * KIND, either express or implied. See the License for the |
| 16 | + * specific language governing permissions and limitations |
| 17 | + * under the License. |
| 18 | + */ |
| 19 | +package org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage; |
| 20 | + |
| 21 | +import org.apache.jackrabbit.core.data.DataIdentifier; |
| 22 | +import org.apache.jackrabbit.core.data.DataRecord; |
| 23 | +import org.apache.jackrabbit.core.data.DataStoreException; |
| 24 | +import org.apache.jackrabbit.oak.plugins.blob.datastore.directaccess.DataRecordDownloadOptions; |
| 25 | +import org.apache.jackrabbit.oak.plugins.blob.datastore.directaccess.DataRecordUpload; |
| 26 | +import org.apache.jackrabbit.oak.plugins.blob.datastore.directaccess.DataRecordUploadException; |
| 27 | +import org.apache.jackrabbit.oak.plugins.blob.datastore.directaccess.DataRecordUploadOptions; |
| 28 | +import org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend; |
| 29 | +import org.jetbrains.annotations.NotNull; |
| 30 | + |
| 31 | +import java.net.URI; |
| 32 | +import java.util.Properties; |
| 33 | + |
| 34 | + |
| 35 | +public abstract class AbstractAzureBlobStoreBackend extends AbstractSharedBackend { |
| 36 | + |
| 37 | + protected abstract DataRecordUpload initiateHttpUpload(long maxUploadSizeInBytes, int maxNumberOfURIs, @NotNull final DataRecordUploadOptions options); |
| 38 | + protected abstract DataRecord completeHttpUpload(@NotNull String uploadTokenStr) throws DataRecordUploadException, DataStoreException; |
| 39 | + protected abstract void setHttpDownloadURIExpirySeconds(int seconds); |
| 40 | + protected abstract void setHttpUploadURIExpirySeconds(int seconds); |
| 41 | + protected abstract void setHttpDownloadURICacheSize(int maxSize); |
| 42 | + protected abstract URI createHttpDownloadURI(@NotNull DataIdentifier identifier, @NotNull DataRecordDownloadOptions downloadOptions); |
| 43 | + public abstract void setProperties(final Properties properties); |
| 44 | + |
| 45 | +} |
0 commit comments