Package io.clonecloudstore.driver.google
Class DriverGoogle
java.lang.Object
io.clonecloudstore.driver.google.DriverGoogle
- All Implemented Interfaces:
DriverApi,Closeable,AutoCloseable
Google Driver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbucketCreate(StorageBucket bucket) voidbucketDelete(String bucket) booleanbucketExists(String bucket) bucketImport(StorageBucket bucket) longvoidclose()directoryOrObjectExistsInBucket(String bucket, String directoryOrObject) objectCopy(StorageObject objectSource, StorageObject objectTarget) voidobjectDeleteInBucket(String bucket, String object) objectFinalizeCreateInBucket(String bucket, String object, long realLen, String sha256) objectGetInputStreamInBucket(String bucket, String object) objectGetMetadataInBucket(String bucket, String object) voidobjectPrepareCreateInBucket(StorageObject object, InputStream inputStream) longobjectsCountInBucket(String bucket) longobjectsCountInBucket(String bucket, String prefix, Instant from, Instant to) objectsIteratorInBucket(String bucket) objectsIteratorInBucket(String bucket, String prefix, Instant from, Instant to) objectsStreamInBucket(String bucket) objectsStreamInBucket(String bucket, String prefix, Instant from, Instant to) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.clonecloudstore.driver.api.DriverApi
bucketDelete, bucketExists, directoryOrObjectExistsInBucket, objectCopy, objectDeleteInBucket, objectFinalizeCreateInBucket, objectGetInputStreamInBucket, objectGetMetadataInBucket, objectsCountInBucket, objectsCountInBucket, objectsIteratorInBucket, objectsIteratorInBucket, objectsStreamInBucket, objectsStreamInBucket, validCopy
-
Constructor Details
-
DriverGoogle
- Throws:
DriverRuntimeException
-
-
Method Details
-
bucketsCount
- Specified by:
bucketsCountin interfaceDriverApi- Throws:
DriverException
-
bucketsStream
- Specified by:
bucketsStreamin interfaceDriverApi- Throws:
DriverException
-
bucketsIterator
- Specified by:
bucketsIteratorin interfaceDriverApi- Throws:
DriverException
-
bucketGet
- Specified by:
bucketGetin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverException
-
bucketCreate
public StorageBucket bucketCreate(StorageBucket bucket) throws DriverNotAcceptableException, DriverAlreadyExistException, DriverException - Specified by:
bucketCreatein interfaceDriverApi- Throws:
DriverNotAcceptableExceptionDriverAlreadyExistExceptionDriverException
-
bucketImport
public StorageBucket bucketImport(StorageBucket bucket) throws DriverNotAcceptableException, DriverAlreadyExistException, DriverException - Specified by:
bucketImportin interfaceDriverApi- Throws:
DriverNotAcceptableExceptionDriverAlreadyExistExceptionDriverException
-
bucketDelete
public void bucketDelete(String bucket) throws DriverNotAcceptableException, DriverNotFoundException, DriverException - Specified by:
bucketDeletein interfaceDriverApi- Throws:
DriverNotAcceptableExceptionDriverNotFoundExceptionDriverException
-
bucketExists
- Specified by:
bucketExistsin interfaceDriverApi- Throws:
DriverException
-
objectsCountInBucket
- Specified by:
objectsCountInBucketin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverException
-
objectsCountInBucket
public long objectsCountInBucket(String bucket, String prefix, Instant from, Instant to) throws DriverNotFoundException, DriverException - Specified by:
objectsCountInBucketin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverException
-
objectsStreamInBucket
public Stream<StorageObject> objectsStreamInBucket(String bucket) throws DriverNotFoundException, DriverException - Specified by:
objectsStreamInBucketin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverException
-
objectsStreamInBucket
public Stream<StorageObject> objectsStreamInBucket(String bucket, String prefix, Instant from, Instant to) throws DriverNotFoundException, DriverException - Specified by:
objectsStreamInBucketin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverException
-
objectsIteratorInBucket
public Iterator<StorageObject> objectsIteratorInBucket(String bucket) throws DriverNotFoundException, DriverException - Specified by:
objectsIteratorInBucketin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverException
-
objectsIteratorInBucket
public Iterator<StorageObject> objectsIteratorInBucket(String bucket, String prefix, Instant from, Instant to) throws DriverNotFoundException, DriverException - Specified by:
objectsIteratorInBucketin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverException
-
directoryOrObjectExistsInBucket
public StorageType directoryOrObjectExistsInBucket(String bucket, String directoryOrObject) throws DriverException - Specified by:
directoryOrObjectExistsInBucketin interfaceDriverApi- Throws:
DriverException
-
objectPrepareCreateInBucket
public void objectPrepareCreateInBucket(StorageObject object, InputStream inputStream) throws DriverNotFoundException, DriverAlreadyExistException, DriverException - Specified by:
objectPrepareCreateInBucketin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverAlreadyExistExceptionDriverException
-
objectFinalizeCreateInBucket
public StorageObject objectFinalizeCreateInBucket(String bucket, String object, long realLen, String sha256) throws DriverNotFoundException, DriverAlreadyExistException, DriverException - Specified by:
objectFinalizeCreateInBucketin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverAlreadyExistExceptionDriverException
-
objectGetInputStreamInBucket
public InputStream objectGetInputStreamInBucket(String bucket, String object) throws DriverNotFoundException, DriverException - Specified by:
objectGetInputStreamInBucketin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverException
-
objectCopy
public StorageObject objectCopy(StorageObject objectSource, StorageObject objectTarget) throws DriverNotFoundException, DriverAlreadyExistException, DriverException - Specified by:
objectCopyin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverAlreadyExistExceptionDriverException
-
objectGetMetadataInBucket
public StorageObject objectGetMetadataInBucket(String bucket, String object) throws DriverNotFoundException, DriverException - Specified by:
objectGetMetadataInBucketin interfaceDriverApi- Throws:
DriverNotFoundExceptionDriverException
-
objectDeleteInBucket
public void objectDeleteInBucket(String bucket, String object) throws DriverNotAcceptableException, DriverNotFoundException, DriverException - Specified by:
objectDeleteInBucketin interfaceDriverApi- Throws:
DriverNotAcceptableExceptionDriverNotFoundExceptionDriverException
-
close
public void close()
-