forked from KscSDK/ksc-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request KscSDK#183 from KscSDK/trunk
Trunk
- Loading branch information
Showing
59 changed files
with
1,192 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
ksc-sdk-java-redis/src/main/java/com/ksc/redis/client/support/KscRedisBackupClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package com.ksc.redis.client.support; | ||
|
||
import com.ksc.ClientConfiguration; | ||
import com.ksc.auth.AWSCredentials; | ||
import com.ksc.auth.AWSCredentialsProvider; | ||
import com.ksc.metrics.RequestMetricCollector; | ||
import com.ksc.redis.client.KscRedisClient; | ||
import com.ksc.redis.model.RedisResponse; | ||
import com.ksc.redis.model.backup.*; | ||
import com.ksc.redis.transform.backup.*; | ||
|
||
public class KscRedisBackupClient extends KscRedisClient { | ||
public KscRedisBackupClient() { | ||
super(); | ||
} | ||
|
||
public KscRedisBackupClient(AWSCredentials awsCredentials, String az) { | ||
super(awsCredentials, az); | ||
} | ||
|
||
public KscRedisBackupClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, String az) { | ||
super(awsCredentials, clientConfiguration, az); | ||
} | ||
|
||
public KscRedisBackupClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, String az) { | ||
super(awsCredentialsProvider, clientConfiguration, az); | ||
} | ||
|
||
public KscRedisBackupClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector, String az) { | ||
super(awsCredentialsProvider, clientConfiguration, requestMetricCollector, az); | ||
} | ||
|
||
public RedisResponse createSnapshot(CreateSnapshotRequest req) { | ||
return doAction(new CreateSnapshotMarshaller().marshall(super.beforeMarshalling(req)), new CreateSnapshotUnmarshaller()).getKscResponse(); | ||
} | ||
|
||
public RedisResponse deleteSnapshot(DeleteSnapshotRequest req) { | ||
return doAction(new DeleteSnapshotMarshaller().marshall(super.beforeMarshalling(req)), new DeleteSnapshotUnmarshaller()).getKscResponse(); | ||
} | ||
|
||
public RedisResponse restoreSnapshot(RestoreSnapshotRequest req) { | ||
return doAction(new RestoreSnapshotMarshaller().marshall(super.beforeMarshalling(req)), new RestoreSnapshotUnmarshaller()).getKscResponse(); | ||
} | ||
|
||
public RedisResponse<DescribeSnapshotResponse[]> describeSnapshot(DescribeSnapshotRequest req) { | ||
return doAction(new DescribeSnapshotMarshaller().marshall(super.beforeMarshalling(req)), new DescribeSnapshotUnmarshaller()).getKscResponse(); | ||
} | ||
|
||
public RedisResponse<DownloadSnapshotResponse> downloadSnapshot(DownloadSnapshotRequest req) { | ||
return doAction(new DownloadSnapshotMarshaller().marshall(super.beforeMarshalling(req)), new DownloadSnapshotUnmarshaller()).getKscResponse(); | ||
} | ||
|
||
public RedisResponse exportSnapshot(ExportSnapshotRequest req) { | ||
return doAction(new ExportSnapshotMarshaller().marshall(super.beforeMarshalling(req)), new ExportSnapshotUnmarshaller()).getKscResponse(); | ||
} | ||
|
||
public RedisResponse setTimingSnapshot(SetTimingSnapshotRequest req) { | ||
return doAction(new SetTimingSnapshotMarshaller().marshall(super.beforeMarshalling(req)), new SetTimingSnapshotUnmarshaller()).getKscResponse(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
ksc-sdk-java-redis/src/main/java/com/ksc/redis/model/backup/CreateSnapshotRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.ksc.redis.model.backup; | ||
|
||
import com.ksc.KscWebServiceRequest; | ||
import com.ksc.Request; | ||
import com.ksc.model.DryRunSupportedRequest; | ||
import com.ksc.redis.transform.backup.CreateSnapshotMarshaller; | ||
|
||
import java.io.Serializable; | ||
|
||
public class CreateSnapshotRequest extends KscWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<CreateSnapshotRequest> { | ||
private String cacheId; | ||
private String name; | ||
|
||
public String getCacheId() { | ||
return cacheId; | ||
} | ||
|
||
public void setCacheId(String cacheId) { | ||
this.cacheId = cacheId; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public Request<CreateSnapshotRequest> getDryRunRequest() { | ||
Request<CreateSnapshotRequest> request = new CreateSnapshotMarshaller().marshall(this); | ||
request.addParameter("DryRun", Boolean.toString(true)); | ||
return request; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
ksc-sdk-java-redis/src/main/java/com/ksc/redis/model/backup/DeleteSnapshotRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.ksc.redis.model.backup; | ||
|
||
import com.ksc.KscWebServiceRequest; | ||
import com.ksc.Request; | ||
import com.ksc.model.DryRunSupportedRequest; | ||
import com.ksc.redis.transform.backup.DeleteSnapshotMarshaller; | ||
|
||
import java.io.Serializable; | ||
|
||
public class DeleteSnapshotRequest extends KscWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<DeleteSnapshotRequest> { | ||
private String snapshotId; | ||
|
||
public String getSnapshotId() { | ||
return snapshotId; | ||
} | ||
|
||
public void setSnapshotId(String snapshotId) { | ||
this.snapshotId = snapshotId; | ||
} | ||
|
||
@Override | ||
public Request<DeleteSnapshotRequest> getDryRunRequest() { | ||
Request<DeleteSnapshotRequest> request = new DeleteSnapshotMarshaller().marshall(this); | ||
request.addParameter("DryRun", Boolean.toString(true)); | ||
return request; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
ksc-sdk-java-redis/src/main/java/com/ksc/redis/model/backup/DescribeSnapshotRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.ksc.redis.model.backup; | ||
|
||
import com.ksc.KscWebServiceRequest; | ||
import com.ksc.Request; | ||
import com.ksc.model.DryRunSupportedRequest; | ||
import com.ksc.redis.transform.backup.DescribeSnapshotMarshaller; | ||
|
||
import java.io.Serializable; | ||
|
||
public class DescribeSnapshotRequest extends KscWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<DescribeSnapshotRequest> { | ||
private String cacheId; | ||
|
||
public String getCacheId() { | ||
return cacheId; | ||
} | ||
|
||
public void setCacheId(String cacheId) { | ||
this.cacheId = cacheId; | ||
} | ||
|
||
@Override | ||
public Request<DescribeSnapshotRequest> getDryRunRequest() { | ||
Request<DescribeSnapshotRequest> request = new DescribeSnapshotMarshaller().marshall(this); | ||
request.addParameter("DryRun", Boolean.toString(true)); | ||
return request; | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
ksc-sdk-java-redis/src/main/java/com/ksc/redis/model/backup/DescribeSnapshotResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package com.ksc.redis.model.backup; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
|
||
import java.util.Date; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class DescribeSnapshotResponse { | ||
private String snapshotId; | ||
private String name; | ||
private String cacheId; | ||
private String type; | ||
private String status; | ||
private Date createTime; | ||
private String resourceSize; | ||
|
||
public String getSnapshotId() { | ||
return snapshotId; | ||
} | ||
|
||
public void setSnapshotId(String snapshotId) { | ||
this.snapshotId = snapshotId; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getCacheId() { | ||
return cacheId; | ||
} | ||
|
||
public void setCacheId(String cacheId) { | ||
this.cacheId = cacheId; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
public String getStatus() { | ||
return status; | ||
} | ||
|
||
public void setStatus(String status) { | ||
this.status = status; | ||
} | ||
|
||
public Date getCreateTime() { | ||
return createTime; | ||
} | ||
|
||
public void setCreateTime(Date createTime) { | ||
this.createTime = createTime; | ||
} | ||
|
||
public String getResourceSize() { | ||
return resourceSize; | ||
} | ||
|
||
public void setResourceSize(String resourceSize) { | ||
this.resourceSize = resourceSize; | ||
} | ||
} |
Oops, something went wrong.