Adding java docs
This commit is contained in:
parent
e86b1d1f01
commit
d28d26c635
1 changed files with 10 additions and 4 deletions
|
|
@ -144,7 +144,7 @@ public class ShardInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility method to derive lease key from ShardInfo
|
* Utility method to derive lease key from ShardInfo.
|
||||||
* @param shardInfo
|
* @param shardInfo
|
||||||
* @return lease key
|
* @return lease key
|
||||||
*/
|
*/
|
||||||
|
|
@ -152,10 +152,16 @@ public class ShardInfo {
|
||||||
return getLeaseKey(shardInfo, shardInfo.shardId());
|
return getLeaseKey(shardInfo, shardInfo.shardId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getLeaseKey(ShardInfo shardInfo, String shardId) {
|
/**
|
||||||
|
* Utility method to derive lease key from ShardInfo and shardId to override.
|
||||||
|
* @param shardInfo
|
||||||
|
* @param shardIdOverride
|
||||||
|
* @return lease key
|
||||||
|
*/
|
||||||
|
public static String getLeaseKey(ShardInfo shardInfo, String shardIdOverride) {
|
||||||
return shardInfo.streamIdentifierSerOpt().isPresent() ?
|
return shardInfo.streamIdentifierSerOpt().isPresent() ?
|
||||||
MultiStreamLease.getLeaseKey(shardInfo.streamIdentifierSerOpt().get(), shardId) :
|
MultiStreamLease.getLeaseKey(shardInfo.streamIdentifierSerOpt().get(), shardIdOverride) :
|
||||||
shardId;
|
shardIdOverride;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue