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) void
bucketDelete
(String bucket) boolean
bucketExists
(String bucket) bucketImport
(StorageBucket bucket) long
void
close()
directoryOrObjectExistsInBucket
(String bucket, String directoryOrObject) objectCopy
(StorageObject objectSource, StorageObject objectTarget) void
objectDeleteInBucket
(String bucket, String object) objectFinalizeCreateInBucket
(String bucket, String object, long realLen, String sha256) objectGetInputStreamInBucket
(String bucket, String object) objectGetMetadataInBucket
(String bucket, String object) void
objectPrepareCreateInBucket
(StorageObject object, InputStream inputStream) long
objectsCountInBucket
(String bucket) long
objectsCountInBucket
(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, wait
Methods 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:
bucketsCount
in interfaceDriverApi
- Throws:
DriverException
-
bucketsStream
- Specified by:
bucketsStream
in interfaceDriverApi
- Throws:
DriverException
-
bucketsIterator
- Specified by:
bucketsIterator
in interfaceDriverApi
- Throws:
DriverException
-
bucketGet
- Specified by:
bucketGet
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverException
-
bucketCreate
public StorageBucket bucketCreate(StorageBucket bucket) throws DriverNotAcceptableException, DriverAlreadyExistException, DriverException - Specified by:
bucketCreate
in interfaceDriverApi
- Throws:
DriverNotAcceptableException
DriverAlreadyExistException
DriverException
-
bucketImport
public StorageBucket bucketImport(StorageBucket bucket) throws DriverNotAcceptableException, DriverAlreadyExistException, DriverException - Specified by:
bucketImport
in interfaceDriverApi
- Throws:
DriverNotAcceptableException
DriverAlreadyExistException
DriverException
-
bucketDelete
public void bucketDelete(String bucket) throws DriverNotAcceptableException, DriverNotFoundException, DriverException - Specified by:
bucketDelete
in interfaceDriverApi
- Throws:
DriverNotAcceptableException
DriverNotFoundException
DriverException
-
bucketExists
- Specified by:
bucketExists
in interfaceDriverApi
- Throws:
DriverException
-
objectsCountInBucket
- Specified by:
objectsCountInBucket
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverException
-
objectsCountInBucket
public long objectsCountInBucket(String bucket, String prefix, Instant from, Instant to) throws DriverNotFoundException, DriverException - Specified by:
objectsCountInBucket
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverException
-
objectsStreamInBucket
public Stream<StorageObject> objectsStreamInBucket(String bucket) throws DriverNotFoundException, DriverException - Specified by:
objectsStreamInBucket
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverException
-
objectsStreamInBucket
public Stream<StorageObject> objectsStreamInBucket(String bucket, String prefix, Instant from, Instant to) throws DriverNotFoundException, DriverException - Specified by:
objectsStreamInBucket
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverException
-
objectsIteratorInBucket
public Iterator<StorageObject> objectsIteratorInBucket(String bucket) throws DriverNotFoundException, DriverException - Specified by:
objectsIteratorInBucket
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverException
-
objectsIteratorInBucket
public Iterator<StorageObject> objectsIteratorInBucket(String bucket, String prefix, Instant from, Instant to) throws DriverNotFoundException, DriverException - Specified by:
objectsIteratorInBucket
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverException
-
directoryOrObjectExistsInBucket
public StorageType directoryOrObjectExistsInBucket(String bucket, String directoryOrObject) throws DriverException - Specified by:
directoryOrObjectExistsInBucket
in interfaceDriverApi
- Throws:
DriverException
-
objectPrepareCreateInBucket
public void objectPrepareCreateInBucket(StorageObject object, InputStream inputStream) throws DriverNotFoundException, DriverAlreadyExistException, DriverException - Specified by:
objectPrepareCreateInBucket
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverAlreadyExistException
DriverException
-
objectFinalizeCreateInBucket
public StorageObject objectFinalizeCreateInBucket(String bucket, String object, long realLen, String sha256) throws DriverNotFoundException, DriverAlreadyExistException, DriverException - Specified by:
objectFinalizeCreateInBucket
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverAlreadyExistException
DriverException
-
objectGetInputStreamInBucket
public InputStream objectGetInputStreamInBucket(String bucket, String object) throws DriverNotFoundException, DriverException - Specified by:
objectGetInputStreamInBucket
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverException
-
objectCopy
public StorageObject objectCopy(StorageObject objectSource, StorageObject objectTarget) throws DriverNotFoundException, DriverAlreadyExistException, DriverException - Specified by:
objectCopy
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverAlreadyExistException
DriverException
-
objectGetMetadataInBucket
public StorageObject objectGetMetadataInBucket(String bucket, String object) throws DriverNotFoundException, DriverException - Specified by:
objectGetMetadataInBucket
in interfaceDriverApi
- Throws:
DriverNotFoundException
DriverException
-
objectDeleteInBucket
public void objectDeleteInBucket(String bucket, String object) throws DriverNotAcceptableException, DriverNotFoundException, DriverException - Specified by:
objectDeleteInBucket
in interfaceDriverApi
- Throws:
DriverNotAcceptableException
DriverNotFoundException
DriverException
-
close
public void close()
-