Package com.reve.reed.solomon.shard
Class ShardMetadata
java.lang.Object
com.reve.reed.solomon.shard.ShardMetadata
- Direct Known Subclasses:
Shard
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intDefines how many shards are data shards.protected intDefines the loss percentage that was configured while encoding thisShardprotected intDefines how many bytes were padded at the end of the payload to complete the shard.protected intDefines how many shards are parity shards.protected intDefines the length of each shard in bytes.protected intprotected intStarting sequence number of the shard.protected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintintintintintintintvoidloadShardMetaData(ShardMetadata dst_shardMetadata) voidreset()voidsetDataShardCount(int dataShardCount) voidvoidsetLossPercentage(int lossPercentage) voidsetPaddingLen(int paddingLen) voidsetParityShardCount(int parityShardCount) voidsetShardLen(int shardLen) voidsetSliceSequence(int sliceSequence) voidsetStartSequence(int startSequence) voidsetTotalSlices(int totalSlices) toString()
-
Field Details
-
dataShardCount
protected int dataShardCountDefines how many shards are data shards. -
parityShardCount
protected int parityShardCountDefines how many shards are parity shards. -
lossPercentage
protected int lossPercentageDefines the loss percentage that was configured while encoding thisShard -
shardLen
protected int shardLenDefines the length of each shard in bytes. -
paddingLen
protected int paddingLenDefines how many bytes were padded at the end of the payload to complete the shard. This value should not crossshardLen -
startSequence
protected int startSequenceStarting sequence number of the shard. -
sliceSequence
protected int sliceSequence -
totalSlices
protected int totalSlices
-
-
Constructor Details
-
ShardMetadata
public ShardMetadata()
-
-
Method Details
-
getTotalSlices
public int getTotalSlices() -
setTotalSlices
public void setTotalSlices(int totalSlices) -
getDataShardCount
public int getDataShardCount() -
setDataShardCount
public void setDataShardCount(int dataShardCount) -
getParityShardCount
public int getParityShardCount() -
setParityShardCount
public void setParityShardCount(int parityShardCount) -
getShardLen
public int getShardLen() -
setShardLen
public void setShardLen(int shardLen) -
getPaddingLen
public int getPaddingLen() -
setPaddingLen
public void setPaddingLen(int paddingLen) -
getLossPercentage
public int getLossPercentage() -
setLossPercentage
public void setLossPercentage(int lossPercentage) -
getStartSequence
public int getStartSequence() -
setStartSequence
public void setStartSequence(int startSequence) -
getTotalShardsCount
public int getTotalShardsCount() -
getSliceSequence
public int getSliceSequence() -
setSliceSequence
public void setSliceSequence(int sliceSequence) -
reset
public void reset() -
setInvalidMetaData
public void setInvalidMetaData() -
cloneShardMetaData
-
loadShardMetaData
-
toString
-