public class CloudTokenPersistor
extends com.github.ambry.replication.ReplicaTokenPersistor
CloudTokenPersistor
persists replication token to a cloud storage.Constructor and Description |
---|
CloudTokenPersistor(java.lang.String replicaTokenFileName,
java.util.Map<java.lang.String,java.util.Set<com.github.ambry.replication.PartitionInfo>> partitionGroupedByMountPath,
com.github.ambry.replication.ReplicationMetrics replicationMetrics,
com.github.ambry.clustermap.ClusterMap clusterMap,
com.github.ambry.replication.FindTokenHelper tokenHelper,
CloudDestination cloudDestination)
Constructor for
CloudTokenPersistor . |
Modifier and Type | Method and Description |
---|---|
protected void |
persist(java.lang.String mountPath,
java.util.List<com.github.ambry.replication.RemoteReplicaInfo.ReplicaTokenInfo> tokenInfoList) |
java.util.List<com.github.ambry.replication.RemoteReplicaInfo.ReplicaTokenInfo> |
retrieve(java.lang.String mountPath) |
public CloudTokenPersistor(java.lang.String replicaTokenFileName, java.util.Map<java.lang.String,java.util.Set<com.github.ambry.replication.PartitionInfo>> partitionGroupedByMountPath, com.github.ambry.replication.ReplicationMetrics replicationMetrics, com.github.ambry.clustermap.ClusterMap clusterMap, com.github.ambry.replication.FindTokenHelper tokenHelper, CloudDestination cloudDestination)
CloudTokenPersistor
.replicaTokenFileName
- the token's file name.partitionGroupedByMountPath
- A map between mount path and list of partitions under this mount path.replicationMetrics
- metrics including token persist time.clusterMap
- the ClusterMap
to deserialize tokens.tokenHelper
- the FindTokenHelper
to deserialize tokens.protected void persist(java.lang.String mountPath, java.util.List<com.github.ambry.replication.RemoteReplicaInfo.ReplicaTokenInfo> tokenInfoList) throws java.io.IOException, com.github.ambry.replication.ReplicationException
persist
in class com.github.ambry.replication.ReplicaTokenPersistor
java.io.IOException
com.github.ambry.replication.ReplicationException
public java.util.List<com.github.ambry.replication.RemoteReplicaInfo.ReplicaTokenInfo> retrieve(java.lang.String mountPath) throws com.github.ambry.replication.ReplicationException
retrieve
in class com.github.ambry.replication.ReplicaTokenPersistor
com.github.ambry.replication.ReplicationException