Class ObjectStoreClientImpl
java.lang.Object
co.yellowdog.platform.clients.objectstore.ObjectStoreClientImpl
- All Implemented Interfaces:
ObjectStoreClient
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
checkObjectExists
(@NonNull String namespace, @NonNull String objectName) void
static ObjectStoreClientImpl
create
(@NonNull ServicesSchema servicesSchema, @NonNull RetryFactory retryFactory, @NonNull AuthenticationHeadersProvider authenticationHeadersProvider, @NonNull ObjectStoreClientConfigurationProperties configurationProperties, @NonNull SessionRequestIdGenerator sessionRequestIdGenerator, @NonNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NonNull UserAgent userAgent) static ObjectStoreClientImpl
create
(@NonNull ServicesSchema servicesSchema, @NonNull RetryFactory retryFactory, @NonNull AuthenticationHeadersProvider authenticationHeadersProvider, @NonNull ObjectStoreClientConfigurationProperties configurationProperties, @NonNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NonNull UserAgent userAgent) Factory method for constructing an ObjectStoreClientImpl.createDownloadSession
(@NonNull String namespace, @NonNull String objectName, @NonNull Path destinationFolderPath) createDownloadSession
(@NonNull String namespace, @NonNull String objectName, @NonNull Path destinationFolderPath, @NonNull TransferProperties properties) createUploadSession
(@NonNull String namespace, @NonNull Path sourceFilePath) createUploadSession
(@NonNull String namespace, @NonNull Path sourceFilePath, @NonNull TransferProperties properties) createUploadSession
(@NonNull String namespace, @NonNull Path sourceFilePath, @NonNull String objectName) createUploadSession
(@NonNull String namespace, @NonNull Path sourceFilePath, @NonNull String objectName, @NonNull TransferProperties properties) void
deleteNamespaceStorageConfiguration
(@NonNull String namespace) void
deleteObjects
(@NonNull String namespace, ObjectPath... objectPaths) void
deleteObjects
(@NonNull String namespace, @NonNull Iterable<ObjectPath> objectPaths) List
<? extends TransferSession> List
<? extends TransferSession> int
getNamespaceObjectPaths
(@NonNull ObjectPathsRequest request) Return all object paths that match the request.getNamespaceObjectPaths
(@NonNull ObjectPathsSliceRequest request) getObjectDetail
(@NonNull String namespace, @NonNull String objectName) int
boolean
boolean
putNamespaceStorageConfiguration
(@NonNull NamespaceStorageConfiguration namespaceStorageConfiguration) void
setDownloadMaxBytesPerSecond
(int maxBytesPerSecond) void
setUploadMaxBytesPerSecond
(int maxBytesPerSecond) void
void
streamNamespaceObjectPaths
(@NonNull ObjectPathsRequest request)
-
Method Details
-
create
public static ObjectStoreClientImpl create(@NonNull @NonNull ServicesSchema servicesSchema, @NonNull @NonNull RetryFactory retryFactory, @NonNull @NonNull AuthenticationHeadersProvider authenticationHeadersProvider, @NonNull @NonNull ObjectStoreClientConfigurationProperties configurationProperties, @NonNull @NonNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NonNull @NonNull UserAgent userAgent) Factory method for constructing an ObjectStoreClientImpl.- Parameters:
servicesSchema
- The services schema to use for service URL endpoint addressesretryFactory
- The retry template factory to useauthenticationHeadersProvider
- The authentication headers provider to useobjectMapper
-- Returns:
- a new instance of ObjectStoreClientImpl
-
create
public static ObjectStoreClientImpl create(@NonNull @NonNull ServicesSchema servicesSchema, @NonNull @NonNull RetryFactory retryFactory, @NonNull @NonNull AuthenticationHeadersProvider authenticationHeadersProvider, @NonNull @NonNull ObjectStoreClientConfigurationProperties configurationProperties, @NonNull @NonNull SessionRequestIdGenerator sessionRequestIdGenerator, @NonNull @NonNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NonNull @NonNull UserAgent userAgent) -
getActiveSessions
- Specified by:
getActiveSessions
in interfaceObjectStoreClient
-
getAllSessions
- Specified by:
getAllSessions
in interfaceObjectStoreClient
-
isUploadsActive
public boolean isUploadsActive()- Specified by:
isUploadsActive
in interfaceObjectStoreClient
-
isDownloadsActive
public boolean isDownloadsActive()- Specified by:
isDownloadsActive
in interfaceObjectStoreClient
-
getUploadMaxBytesPerSecond
public int getUploadMaxBytesPerSecond()- Specified by:
getUploadMaxBytesPerSecond
in interfaceObjectStoreClient
-
setUploadMaxBytesPerSecond
public void setUploadMaxBytesPerSecond(int maxBytesPerSecond) - Specified by:
setUploadMaxBytesPerSecond
in interfaceObjectStoreClient
-
getDownloadMaxBytesPerSecond
public int getDownloadMaxBytesPerSecond()- Specified by:
getDownloadMaxBytesPerSecond
in interfaceObjectStoreClient
-
setDownloadMaxBytesPerSecond
public void setDownloadMaxBytesPerSecond(int maxBytesPerSecond) - Specified by:
setDownloadMaxBytesPerSecond
in interfaceObjectStoreClient
-
createUploadSession
public UploadSession createUploadSession(@NonNull @NonNull String namespace, @NonNull @NonNull Path sourceFilePath) throws IOException - Specified by:
createUploadSession
in interfaceObjectStoreClient
- Throws:
IOException
-
createUploadSession
public UploadSession createUploadSession(@NonNull @NonNull String namespace, @NonNull @NonNull Path sourceFilePath, @NonNull @NonNull TransferProperties properties) throws IOException - Specified by:
createUploadSession
in interfaceObjectStoreClient
- Throws:
IOException
-
createUploadSession
public UploadSession createUploadSession(@NonNull @NonNull String namespace, @NonNull @NonNull Path sourceFilePath, @NonNull @NonNull String objectName) throws IOException - Specified by:
createUploadSession
in interfaceObjectStoreClient
- Throws:
IOException
-
createUploadSession
public UploadSession createUploadSession(@NonNull @NonNull String namespace, @NonNull @NonNull Path sourceFilePath, @NonNull @NonNull String objectName, @NonNull @NonNull TransferProperties properties) throws IOException - Specified by:
createUploadSession
in interfaceObjectStoreClient
- Throws:
IOException
-
createDownloadSession
public DownloadSession createDownloadSession(@NonNull @NonNull String namespace, @NonNull @NonNull String objectName, @NonNull @NonNull Path destinationFolderPath) - Specified by:
createDownloadSession
in interfaceObjectStoreClient
-
createDownloadSession
public DownloadSession createDownloadSession(@NonNull @NonNull String namespace, @NonNull @NonNull String objectName, @NonNull @NonNull Path destinationFolderPath, @NonNull @NonNull TransferProperties properties) - Specified by:
createDownloadSession
in interfaceObjectStoreClient
-
startTransfers
public void startTransfers()- Specified by:
startTransfers
in interfaceObjectStoreClient
-
stopTransfers
public void stopTransfers()- Specified by:
stopTransfers
in interfaceObjectStoreClient
-
clearInactiveSessions
public void clearInactiveSessions()- Specified by:
clearInactiveSessions
in interfaceObjectStoreClient
-
abortAllTransfers
public void abortAllTransfers()- Specified by:
abortAllTransfers
in interfaceObjectStoreClient
-
getObjectDetail
public ObjectDetail getObjectDetail(@NonNull @NonNull String namespace, @NonNull @NonNull String objectName) - Specified by:
getObjectDetail
in interfaceObjectStoreClient
-
checkObjectExists
public boolean checkObjectExists(@NonNull @NonNull String namespace, @NonNull @NonNull String objectName) - Specified by:
checkObjectExists
in interfaceObjectStoreClient
-
getNamespaces
- Specified by:
getNamespaces
in interfaceObjectStoreClient
-
getNamespaceObjectPaths
Description copied from interface:ObjectStoreClient
Return all object paths that match the request.For large numbers of objects, consider using either
ObjectStoreClient.streamNamespaceObjectPaths(co.yellowdog.platform.interaction.objectstore.ObjectPathsRequest)
orObjectStoreClient.getNamespaceObjectPaths(ObjectPathsSliceRequest)
.- Specified by:
getNamespaceObjectPaths
in interfaceObjectStoreClient
- Parameters:
request
- the request- Returns:
- the object paths
-
streamNamespaceObjectPaths
- Specified by:
streamNamespaceObjectPaths
in interfaceObjectStoreClient
-
getNamespaceObjectPaths
- Specified by:
getNamespaceObjectPaths
in interfaceObjectStoreClient
-
deleteObjects
public void deleteObjects(@NonNull @NonNull String namespace, @NonNull @NonNull Iterable<ObjectPath> objectPaths) - Specified by:
deleteObjects
in interfaceObjectStoreClient
-
deleteObjects
- Specified by:
deleteObjects
in interfaceObjectStoreClient
-
putNamespaceStorageConfiguration
public NamespaceStorageConfiguration putNamespaceStorageConfiguration(@NonNull @NonNull NamespaceStorageConfiguration namespaceStorageConfiguration) - Specified by:
putNamespaceStorageConfiguration
in interfaceObjectStoreClient
-
deleteNamespaceStorageConfiguration
- Specified by:
deleteNamespaceStorageConfiguration
in interfaceObjectStoreClient
-
getNamespaceStorageConfigurations
- Specified by:
getNamespaceStorageConfigurations
in interfaceObjectStoreClient
-
buildUploadBatch
- Specified by:
buildUploadBatch
in interfaceObjectStoreClient
-
buildDownloadBatch
- Specified by:
buildDownloadBatch
in interfaceObjectStoreClient
-