public class S3Repository extends Object implements LargeFileRepository
| Constructor and Description |
|---|
S3Repository(S3Config config)
Construct a LFS repository storing large objects in Amazon S3
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cacheObjectMetaData(AnyLongObjectId oid,
long size)
Cache metadata (size) for an object to avoid extra roundtrip to S3 in
order to retrieve this metadata for a given object.
|
Response.Action |
getDownloadAction(AnyLongObjectId oid)
Get download action
|
long |
getSize(AnyLongObjectId oid)
Get size of an object
|
Response.Action |
getUploadAction(AnyLongObjectId oid,
long size)
Get upload action
|
Response.Action |
getVerifyAction(AnyLongObjectId id)
Get verify action
|
public S3Repository(S3Config config)
config - AWS S3 storage bucket configurationpublic Response.Action getDownloadAction(AnyLongObjectId oid)
getDownloadAction in interface LargeFileRepositoryoid - id of the object to downloadpublic Response.Action getUploadAction(AnyLongObjectId oid, long size)
getUploadAction in interface LargeFileRepositoryoid - id of the object to uploadsize - size of the object to be uploadedpublic Response.Action getVerifyAction(AnyLongObjectId id)
getVerifyAction in interface LargeFileRepositoryid - id of the object to be verifiednull if the server
doesn't support or require verificationpublic long getSize(AnyLongObjectId oid) throws IOException
getSize in interface LargeFileRepositoryoid - id of the objectIOExceptionprotected void cacheObjectMetaData(AnyLongObjectId oid, long size)
getSize(AnyLongObjectId)
to retrieve the object size from the local cache to eliminate the need
for another roundtrip to S3oid - the object id identifying the object to be cachedsize - the object's size (in bytes)Copyright © 2017 Eclipse JGit Project. All rights reserved.