Skip to content

Commit

Permalink
Update MinioStorageEngine.java
Browse files Browse the repository at this point in the history
  • Loading branch information
pipinet authored Jan 17, 2024
1 parent f02522a commit 4cbf1e2
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


import com.google.common.collect.Lists;
import com.qwlabs.cdi.dispatch.Dispatchable;
import com.qwlabs.storage.messages.StorageMessages;
import com.qwlabs.storage.models.CompleteUploadCommand;
import com.qwlabs.storage.models.GetDownloadUrlCommand;
Expand All @@ -15,11 +16,14 @@
import com.qwlabs.storage.services.StorageEngine;
import io.minio.messages.ListPartsResult;
import io.minio.messages.Part;
import org.jetbrains.annotations.Nullable;

import java.io.InputStream;
import java.util.List;
import java.util.Objects;

public class MinioStorageEngine implements StorageEngine {
public class MinioStorageEngine implements StorageEngine, Dispatchable<String> {
private static final String PROVIDER = "minio";
protected final CustomMinioClient minioClient;

public MinioStorageEngine(CustomMinioClient minioClient) {
Expand Down Expand Up @@ -92,4 +96,9 @@ private void setupBucket(String bucket) {
minioClient.makeBucket(bucket);
}
}

@Override
public boolean dispatchable(@Nullable String context) {
return Objects.equals(PROVIDER, context);
}
}

0 comments on commit 4cbf1e2

Please sign in to comment.