hexsha
stringlengths
40
40
repo
stringlengths
6
126
path
stringlengths
6
1.02k
license
sequence
language
stringclasses
1 value
identifier
stringlengths
1
220
return_type
stringlengths
1
110
original_string
stringlengths
39
223k
original_docstring
stringlengths
16
34.8k
docstring
stringlengths
11
3.41k
docstring_tokens
sequence
code
stringlengths
26
223k
code_tokens
sequence
short_docstring
stringlengths
0
3.02k
short_docstring_tokens
sequence
comment
sequence
parameters
list
docstring_params
dict
input_ids
sequence
attention_mask
sequence
labels
sequence
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withCallProcessRecordsEvenForEmptyRecordList
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withCallProcessRecordsEvenForEmptyRecordList( boolean callProcessRecordsEvenForEmptyRecordList) { this.callProcessRecordsEvenForEmptyRecordList = callProcessRecordsEvenForEmptyRecordList; return this; }
/** * @param callProcessRecordsEvenForEmptyRecordList * Call the ShardRecordProcessor::processRecords() API even if * GetRecords returned an empty record list * @return KinesisClientLibConfiguration */
@param callProcessRecordsEvenForEmptyRecordList Call the ShardRecordProcessor::processRecords() API even if GetRecords returned an empty record list @return KinesisClientLibConfiguration
[ "@param", "callProcessRecordsEvenForEmptyRecordList", "Call", "the", "ShardRecordProcessor", "::", "processRecords", "()", "API", "even", "if", "GetRecords", "returned", "an", "empty", "record", "list", "@return", "KinesisClientLibConfiguration" ]
public KinesisClientLibConfiguration withCallProcessRecordsEvenForEmptyRecordList( boolean callProcessRecordsEvenForEmptyRecordList) { this.callProcessRecordsEvenForEmptyRecordList = callProcessRecordsEvenForEmptyRecordList; return this; }
[ "public", "KinesisClientLibConfiguration", "withCallProcessRecordsEvenForEmptyRecordList", "(", "boolean", "callProcessRecordsEvenForEmptyRecordList", ")", "{", "this", ".", "callProcessRecordsEvenForEmptyRecordList", "=", "callProcessRecordsEvenForEmptyRecordList", ";", "return", "this", ";", "}" ]
@param callProcessRecordsEvenForEmptyRecordList Call the ShardRecordProcessor::processRecords() API even if GetRecords returned an empty record list @return KinesisClientLibConfiguration
[ "@param", "callProcessRecordsEvenForEmptyRecordList", "Call", "the", "ShardRecordProcessor", "::", "processRecords", "()", "API", "even", "if", "GetRecords", "returned", "an", "empty", "record", "list", "@return", "KinesisClientLibConfiguration" ]
[]
[ { "param": "callProcessRecordsEvenForEmptyRecordList", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "callProcessRecordsEvenForEmptyRecordList", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 1477, 2227, 6499, 8321, 1290, 1921, 2115, 682, 12, 203, 5411, 1250, 745, 2227, 6499, 8321, 1290, 1921, 2115, 682, 13, 288, 203, 3639, 333, 18, 1991, 2227, 6499, 8321, 1290, 1921, 2115, 682, 273, 745, 2227, 6499, 8321, 1290, 1921, 2115, 682, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 745, 2227, 6499, 8321, 1290, 1921, 2115, 682, 203, 377, 380, 5411, 3049, 326, 16490, 2115, 5164, 2866, 2567, 6499, 1435, 1491, 5456, 309, 203, 377, 380, 5411, 968, 6499, 2106, 392, 1008, 1409, 666, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withParentShardPollIntervalMillis
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withParentShardPollIntervalMillis(long parentShardPollIntervalMillis) { checkIsValuePositive("ParentShardPollIntervalMillis", parentShardPollIntervalMillis); this.parentShardPollIntervalMillis = parentShardPollIntervalMillis; return this; }
/** * @param parentShardPollIntervalMillis * Wait for this long between polls to check if parent shards are done * @return KinesisClientLibConfiguration */
@param parentShardPollIntervalMillis Wait for this long between polls to check if parent shards are done @return KinesisClientLibConfiguration
[ "@param", "parentShardPollIntervalMillis", "Wait", "for", "this", "long", "between", "polls", "to", "check", "if", "parent", "shards", "are", "done", "@return", "KinesisClientLibConfiguration" ]
public KinesisClientLibConfiguration withParentShardPollIntervalMillis(long parentShardPollIntervalMillis) { checkIsValuePositive("ParentShardPollIntervalMillis", parentShardPollIntervalMillis); this.parentShardPollIntervalMillis = parentShardPollIntervalMillis; return this; }
[ "public", "KinesisClientLibConfiguration", "withParentShardPollIntervalMillis", "(", "long", "parentShardPollIntervalMillis", ")", "{", "checkIsValuePositive", "(", "\"ParentShardPollIntervalMillis\"", ",", "parentShardPollIntervalMillis", ")", ";", "this", ".", "parentShardPollIntervalMillis", "=", "parentShardPollIntervalMillis", ";", "return", "this", ";", "}" ]
@param parentShardPollIntervalMillis Wait for this long between polls to check if parent shards are done @return KinesisClientLibConfiguration
[ "@param", "parentShardPollIntervalMillis", "Wait", "for", "this", "long", "between", "polls", "to", "check", "if", "parent", "shards", "are", "done", "@return", "KinesisClientLibConfiguration" ]
[]
[ { "param": "parentShardPollIntervalMillis", "type": "long" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "parentShardPollIntervalMillis", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 3054, 8428, 19085, 4006, 4814, 12, 5748, 982, 8428, 19085, 4006, 4814, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 3054, 8428, 19085, 4006, 4814, 3113, 982, 8428, 19085, 4006, 4814, 1769, 203, 3639, 333, 18, 2938, 8428, 19085, 4006, 4814, 273, 982, 8428, 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100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withCleanupLeasesUponShardCompletion
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withCleanupLeasesUponShardCompletion( boolean cleanupLeasesUponShardCompletion) { this.cleanupLeasesUponShardCompletion = cleanupLeasesUponShardCompletion; return this; }
/** * @param cleanupLeasesUponShardCompletion * Clean up shards we've finished processing (don't wait for expiration * in Kinesis) * @return KinesisClientLibConfiguration */
@param cleanupLeasesUponShardCompletion Clean up shards we've finished processing (don't wait for expiration in Kinesis) @return KinesisClientLibConfiguration
[ "@param", "cleanupLeasesUponShardCompletion", "Clean", "up", "shards", "we", "'", "ve", "finished", "processing", "(", "don", "'", "t", "wait", "for", "expiration", "in", "Kinesis", ")", "@return", "KinesisClientLibConfiguration" ]
public KinesisClientLibConfiguration withCleanupLeasesUponShardCompletion( boolean cleanupLeasesUponShardCompletion) { this.cleanupLeasesUponShardCompletion = cleanupLeasesUponShardCompletion; return this; }
[ "public", "KinesisClientLibConfiguration", "withCleanupLeasesUponShardCompletion", "(", "boolean", "cleanupLeasesUponShardCompletion", ")", "{", "this", ".", "cleanupLeasesUponShardCompletion", "=", "cleanupLeasesUponShardCompletion", ";", "return", "this", ";", "}" ]
@param cleanupLeasesUponShardCompletion Clean up shards we've finished processing (don't wait for expiration in Kinesis) @return KinesisClientLibConfiguration
[ "@param", "cleanupLeasesUponShardCompletion", "Clean", "up", "shards", "we", "'", "ve", "finished", "processing", "(", "don", "'", "t", "wait", "for", "expiration", "in", "Kinesis", ")", "@return", "KinesisClientLibConfiguration" ]
[]
[ { "param": "cleanupLeasesUponShardCompletion", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cleanupLeasesUponShardCompletion", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 15007, 1682, 3304, 57, 500, 8428, 11238, 12, 203, 5411, 1250, 6686, 1682, 3304, 57, 500, 8428, 11238, 13, 288, 203, 3639, 333, 18, 16732, 1682, 3304, 57, 500, 8428, 11238, 273, 6686, 1682, 3304, 57, 500, 8428, 11238, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 6686, 1682, 3304, 57, 500, 8428, 11238, 203, 377, 380, 5411, 9645, 731, 15540, 732, 8081, 6708, 4929, 261, 19752, 1404, 2529, 364, 7686, 203, 377, 380, 5411, 316, 17291, 13, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withTaskBackoffTimeMillis
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withTaskBackoffTimeMillis(long taskBackoffTimeMillis) { checkIsValuePositive("TaskBackoffTimeMillis", taskBackoffTimeMillis); this.taskBackoffTimeMillis = taskBackoffTimeMillis; return this; }
/** * @param taskBackoffTimeMillis * Backoff period when tasks encounter an exception * @return KinesisClientLibConfiguration */
@param taskBackoffTimeMillis Backoff period when tasks encounter an exception @return KinesisClientLibConfiguration
[ "@param", "taskBackoffTimeMillis", "Backoff", "period", "when", "tasks", "encounter", "an", "exception", "@return", "KinesisClientLibConfiguration" ]
public KinesisClientLibConfiguration withTaskBackoffTimeMillis(long taskBackoffTimeMillis) { checkIsValuePositive("TaskBackoffTimeMillis", taskBackoffTimeMillis); this.taskBackoffTimeMillis = taskBackoffTimeMillis; return this; }
[ "public", "KinesisClientLibConfiguration", "withTaskBackoffTimeMillis", "(", "long", "taskBackoffTimeMillis", ")", "{", "checkIsValuePositive", "(", "\"TaskBackoffTimeMillis\"", ",", "taskBackoffTimeMillis", ")", ";", "this", ".", "taskBackoffTimeMillis", "=", "taskBackoffTimeMillis", ";", "return", "this", ";", "}" ]
@param taskBackoffTimeMillis Backoff period when tasks encounter an exception @return KinesisClientLibConfiguration
[ "@param", "taskBackoffTimeMillis", "Backoff", "period", "when", "tasks", "encounter", "an", "exception", "@return", "KinesisClientLibConfiguration" ]
[]
[ { "param": "taskBackoffTimeMillis", "type": "long" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "taskBackoffTimeMillis", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 2174, 16757, 28512, 12, 5748, 1562, 16757, 28512, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 2174, 16757, 28512, 3113, 1562, 16757, 28512, 1769, 203, 3639, 333, 18, 4146, 16757, 28512, 273, 1562, 16757, 28512, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 1562, 16757, 28512, 203, 377, 380, 5411, 4297, 3674, 3879, 1347, 4592, 8273, 392, 1520, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withMetricsBufferTimeMillis
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withMetricsBufferTimeMillis(long metricsBufferTimeMillis) { checkIsValuePositive("MetricsBufferTimeMillis", metricsBufferTimeMillis); this.metricsBufferTimeMillis = metricsBufferTimeMillis; return this; }
/** * @param metricsBufferTimeMillis * Metrics are buffered for at most this long before publishing to CloudWatch * @return KinesisClientLibConfiguration */
@param metricsBufferTimeMillis Metrics are buffered for at most this long before publishing to CloudWatch @return KinesisClientLibConfiguration
[ "@param", "metricsBufferTimeMillis", "Metrics", "are", "buffered", "for", "at", "most", "this", "long", "before", "publishing", "to", "CloudWatch", "@return", "KinesisClientLibConfiguration" ]
public KinesisClientLibConfiguration withMetricsBufferTimeMillis(long metricsBufferTimeMillis) { checkIsValuePositive("MetricsBufferTimeMillis", metricsBufferTimeMillis); this.metricsBufferTimeMillis = metricsBufferTimeMillis; return this; }
[ "public", "KinesisClientLibConfiguration", "withMetricsBufferTimeMillis", "(", "long", "metricsBufferTimeMillis", ")", "{", "checkIsValuePositive", "(", "\"MetricsBufferTimeMillis\"", ",", "metricsBufferTimeMillis", ")", ";", "this", ".", "metricsBufferTimeMillis", "=", "metricsBufferTimeMillis", ";", "return", "this", ";", "}" ]
@param metricsBufferTimeMillis Metrics are buffered for at most this long before publishing to CloudWatch @return KinesisClientLibConfiguration
[ "@param", "metricsBufferTimeMillis", "Metrics", "are", "buffered", "for", "at", "most", "this", "long", "before", "publishing", "to", "CloudWatch", "@return", "KinesisClientLibConfiguration" ]
[]
[ { "param": "metricsBufferTimeMillis", "type": "long" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "metricsBufferTimeMillis", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 5653, 1892, 28512, 12, 5748, 4309, 1892, 28512, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 5653, 1892, 28512, 3113, 4309, 1892, 28512, 1769, 203, 3639, 333, 18, 9597, 1892, 28512, 273, 4309, 1892, 28512, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 4309, 1892, 28512, 203, 377, 380, 5411, 10845, 854, 11445, 364, 622, 4486, 333, 1525, 1865, 23636, 358, 17847, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withMetricsMaxQueueSize
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withMetricsMaxQueueSize(int metricsMaxQueueSize) { checkIsValuePositive("MetricsMaxQueueSize", (long) metricsMaxQueueSize); this.metricsMaxQueueSize = metricsMaxQueueSize; return this; }
/** * @param metricsMaxQueueSize * Max number of metrics to buffer before publishing to CloudWatch * @return KinesisClientLibConfiguration */
@param metricsMaxQueueSize Max number of metrics to buffer before publishing to CloudWatch @return KinesisClientLibConfiguration
[ "@param", "metricsMaxQueueSize", "Max", "number", "of", "metrics", "to", "buffer", "before", "publishing", "to", "CloudWatch", "@return", "KinesisClientLibConfiguration" ]
public KinesisClientLibConfiguration withMetricsMaxQueueSize(int metricsMaxQueueSize) { checkIsValuePositive("MetricsMaxQueueSize", (long) metricsMaxQueueSize); this.metricsMaxQueueSize = metricsMaxQueueSize; return this; }
[ "public", "KinesisClientLibConfiguration", "withMetricsMaxQueueSize", "(", "int", "metricsMaxQueueSize", ")", "{", "checkIsValuePositive", "(", "\"MetricsMaxQueueSize\"", ",", "(", "long", ")", "metricsMaxQueueSize", ")", ";", "this", ".", "metricsMaxQueueSize", "=", "metricsMaxQueueSize", ";", "return", "this", ";", "}" ]
@param metricsMaxQueueSize Max number of metrics to buffer before publishing to CloudWatch @return KinesisClientLibConfiguration
[ "@param", "metricsMaxQueueSize", "Max", "number", "of", "metrics", "to", "buffer", "before", "publishing", "to", "CloudWatch", "@return", "KinesisClientLibConfiguration" ]
[]
[ { "param": "metricsMaxQueueSize", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "metricsMaxQueueSize", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 5653, 2747, 3183, 1225, 12, 474, 4309, 2747, 3183, 1225, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 5653, 2747, 3183, 1225, 3113, 261, 5748, 13, 4309, 2747, 3183, 1225, 1769, 203, 3639, 333, 18, 9597, 2747, 3183, 1225, 273, 4309, 2747, 3183, 1225, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 4309, 2747, 3183, 1225, 203, 377, 380, 5411, 4238, 1300, 434, 4309, 358, 1613, 1865, 23636, 358, 17847, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withMetricsEnabledDimensions
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withMetricsEnabledDimensions(Set<String> metricsEnabledDimensions) { if (metricsEnabledDimensions == null) { this.metricsEnabledDimensions = METRICS_ALWAYS_ENABLED_DIMENSIONS; } else if (metricsEnabledDimensions.contains(MetricsScope.METRICS_DIMENSIONS_ALL)) { this.metricsEnabledDimensions = METRICS_DIMENSIONS_ALL; } else { this.metricsEnabledDimensions = ImmutableSet.<String> builder().addAll(metricsEnabledDimensions) .addAll(METRICS_ALWAYS_ENABLED_DIMENSIONS).build(); } return this; }
/** * Sets the dimensions that are allowed to be emitted in metrics. * * @param metricsEnabledDimensions * Set of dimensions that are allowed. * @return KinesisClientLibConfiguration */
Sets the dimensions that are allowed to be emitted in metrics. @param metricsEnabledDimensions Set of dimensions that are allowed.
[ "Sets", "the", "dimensions", "that", "are", "allowed", "to", "be", "emitted", "in", "metrics", ".", "@param", "metricsEnabledDimensions", "Set", "of", "dimensions", "that", "are", "allowed", "." ]
public KinesisClientLibConfiguration withMetricsEnabledDimensions(Set<String> metricsEnabledDimensions) { if (metricsEnabledDimensions == null) { this.metricsEnabledDimensions = METRICS_ALWAYS_ENABLED_DIMENSIONS; } else if (metricsEnabledDimensions.contains(MetricsScope.METRICS_DIMENSIONS_ALL)) { this.metricsEnabledDimensions = METRICS_DIMENSIONS_ALL; } else { this.metricsEnabledDimensions = ImmutableSet.<String> builder().addAll(metricsEnabledDimensions) .addAll(METRICS_ALWAYS_ENABLED_DIMENSIONS).build(); } return this; }
[ "public", "KinesisClientLibConfiguration", "withMetricsEnabledDimensions", "(", "Set", "<", "String", ">", "metricsEnabledDimensions", ")", "{", "if", "(", "metricsEnabledDimensions", "==", "null", ")", "{", "this", ".", "metricsEnabledDimensions", "=", "METRICS_ALWAYS_ENABLED_DIMENSIONS", ";", "}", "else", "if", "(", "metricsEnabledDimensions", ".", "contains", "(", "MetricsScope", ".", "METRICS_DIMENSIONS_ALL", ")", ")", "{", "this", ".", "metricsEnabledDimensions", "=", "METRICS_DIMENSIONS_ALL", ";", "}", "else", "{", "this", ".", "metricsEnabledDimensions", "=", "ImmutableSet", ".", "<", "String", ">", "builder", "(", ")", ".", "addAll", "(", "metricsEnabledDimensions", ")", ".", "addAll", "(", "METRICS_ALWAYS_ENABLED_DIMENSIONS", ")", ".", "build", "(", ")", ";", "}", "return", "this", ";", "}" ]
Sets the dimensions that are allowed to be emitted in metrics.
[ "Sets", "the", "dimensions", "that", "are", "allowed", "to", "be", "emitted", "in", "metrics", "." ]
[]
[ { "param": "metricsEnabledDimensions", "type": "Set<String>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "metricsEnabledDimensions", "type": "Set<String>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 5653, 1526, 10796, 12, 694, 32, 780, 34, 4309, 1526, 10796, 13, 288, 203, 3639, 309, 261, 9597, 1526, 10796, 422, 446, 13, 288, 203, 5411, 333, 18, 9597, 1526, 10796, 273, 6791, 2259, 4596, 67, 1013, 29295, 67, 13560, 67, 2565, 958, 3156, 1146, 55, 31, 203, 3639, 289, 469, 309, 261, 9597, 1526, 10796, 18, 12298, 12, 5653, 3876, 18, 23081, 4596, 67, 2565, 958, 3156, 1146, 55, 67, 4685, 3719, 288, 203, 5411, 333, 18, 9597, 1526, 10796, 273, 6791, 2259, 4596, 67, 2565, 958, 3156, 1146, 55, 67, 4685, 31, 203, 3639, 289, 469, 288, 203, 5411, 333, 18, 9597, 1526, 10796, 273, 22658, 22782, 780, 34, 2089, 7675, 1289, 1595, 12, 9597, 1526, 10796, 13, 203, 10792, 263, 1289, 1595, 12, 23081, 4596, 67, 1013, 29295, 67, 13560, 67, 2565, 958, 3156, 1146, 55, 2934, 3510, 5621, 203, 3639, 289, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 11511, 326, 5769, 716, 854, 2935, 358, 506, 17826, 316, 4309, 18, 203, 377, 380, 203, 377, 380, 632, 891, 4309, 1526, 10796, 203, 377, 380, 5411, 1000, 434, 5769, 716, 854, 2935, 18, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withValidateSequenceNumberBeforeCheckpointing
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withValidateSequenceNumberBeforeCheckpointing( boolean validateSequenceNumberBeforeCheckpointing) { this.validateSequenceNumberBeforeCheckpointing = validateSequenceNumberBeforeCheckpointing; return this; }
/** * * @param validateSequenceNumberBeforeCheckpointing * whether KCL should validate client provided sequence numbers * with a call to Amazon Kinesis before checkpointing for calls to * {@link ShardRecordProcessorCheckpointer#checkpoint(String)}. * @return KinesisClientLibConfiguration */
@param validateSequenceNumberBeforeCheckpointing whether KCL should validate client provided sequence numbers with a call to Amazon Kinesis before checkpointing for calls to ShardRecordProcessorCheckpointer#checkpoint(String).
[ "@param", "validateSequenceNumberBeforeCheckpointing", "whether", "KCL", "should", "validate", "client", "provided", "sequence", "numbers", "with", "a", "call", "to", "Amazon", "Kinesis", "before", "checkpointing", "for", "calls", "to", "ShardRecordProcessorCheckpointer#checkpoint", "(", "String", ")", "." ]
public KinesisClientLibConfiguration withValidateSequenceNumberBeforeCheckpointing( boolean validateSequenceNumberBeforeCheckpointing) { this.validateSequenceNumberBeforeCheckpointing = validateSequenceNumberBeforeCheckpointing; return this; }
[ "public", "KinesisClientLibConfiguration", "withValidateSequenceNumberBeforeCheckpointing", "(", "boolean", "validateSequenceNumberBeforeCheckpointing", ")", "{", "this", ".", "validateSequenceNumberBeforeCheckpointing", "=", "validateSequenceNumberBeforeCheckpointing", ";", "return", "this", ";", "}" ]
@param validateSequenceNumberBeforeCheckpointing whether KCL should validate client provided sequence numbers with a call to Amazon Kinesis before checkpointing for calls to {@link ShardRecordProcessorCheckpointer#checkpoint(String)}.
[ "@param", "validateSequenceNumberBeforeCheckpointing", "whether", "KCL", "should", "validate", "client", "provided", "sequence", "numbers", "with", "a", "call", "to", "Amazon", "Kinesis", "before", "checkpointing", "for", "calls", "to", "{", "@link", "ShardRecordProcessorCheckpointer#checkpoint", "(", "String", ")", "}", "." ]
[]
[ { "param": "validateSequenceNumberBeforeCheckpointing", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "validateSequenceNumberBeforeCheckpointing", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 4270, 21047, 4649, 14431, 310, 12, 203, 5411, 1250, 1954, 21047, 4649, 14431, 310, 13, 288, 203, 3639, 333, 18, 5662, 21047, 4649, 14431, 310, 273, 1954, 21047, 4649, 14431, 310, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 203, 377, 380, 632, 891, 1954, 21047, 4649, 14431, 310, 203, 377, 380, 5411, 2856, 1475, 5017, 1410, 1954, 1004, 2112, 3102, 5600, 203, 377, 380, 5411, 598, 279, 745, 358, 4495, 17291, 1865, 9776, 310, 364, 4097, 358, 203, 377, 380, 5411, 8901, 1232, 16490, 2115, 5164, 1564, 10437, 7, 25414, 12, 780, 13, 5496, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withSkipShardSyncAtStartupIfLeasesExist
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withSkipShardSyncAtStartupIfLeasesExist( boolean skipShardSyncAtStartupIfLeasesExist) { this.skipShardSyncAtWorkerInitializationIfLeasesExist = skipShardSyncAtStartupIfLeasesExist; return this; }
/** * If set to true, the Worker will not sync shards and leases during initialization if there are one or more leases * in the lease table. This assumes that the shards and leases are in-sync. * This enables customers to choose faster startup times (e.g. during incremental deployments of an application). * * @param skipShardSyncAtStartupIfLeasesExist * Should Worker skip syncing shards and leases at startup (Worker * initialization). * @return KinesisClientLibConfiguration * @return KinesisClientLibConfiguration */
If set to true, the Worker will not sync shards and leases during initialization if there are one or more leases in the lease table. This assumes that the shards and leases are in-sync. This enables customers to choose faster startup times . @param skipShardSyncAtStartupIfLeasesExist Should Worker skip syncing shards and leases at startup (Worker initialization).
[ "If", "set", "to", "true", "the", "Worker", "will", "not", "sync", "shards", "and", "leases", "during", "initialization", "if", "there", "are", "one", "or", "more", "leases", "in", "the", "lease", "table", ".", "This", "assumes", "that", "the", "shards", "and", "leases", "are", "in", "-", "sync", ".", "This", "enables", "customers", "to", "choose", "faster", "startup", "times", ".", "@param", "skipShardSyncAtStartupIfLeasesExist", "Should", "Worker", "skip", "syncing", "shards", "and", "leases", "at", "startup", "(", "Worker", "initialization", ")", "." ]
public KinesisClientLibConfiguration withSkipShardSyncAtStartupIfLeasesExist( boolean skipShardSyncAtStartupIfLeasesExist) { this.skipShardSyncAtWorkerInitializationIfLeasesExist = skipShardSyncAtStartupIfLeasesExist; return this; }
[ "public", "KinesisClientLibConfiguration", "withSkipShardSyncAtStartupIfLeasesExist", "(", "boolean", "skipShardSyncAtStartupIfLeasesExist", ")", "{", "this", ".", "skipShardSyncAtWorkerInitializationIfLeasesExist", "=", "skipShardSyncAtStartupIfLeasesExist", ";", "return", "this", ";", "}" ]
If set to true, the Worker will not sync shards and leases during initialization if there are one or more leases in the lease table.
[ "If", "set", "to", "true", "the", "Worker", "will", "not", "sync", "shards", "and", "leases", "during", "initialization", "if", "there", "are", "one", "or", "more", "leases", "in", "the", "lease", "table", "." ]
[]
[ { "param": "skipShardSyncAtStartupIfLeasesExist", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "skipShardSyncAtStartupIfLeasesExist", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 6368, 8428, 4047, 861, 22178, 2047, 1682, 3304, 4786, 12, 203, 5411, 1250,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11016, 903, 486, 3792, 15540, 471, 884, 3304, 4982, 10313, 309, 1915, 854, 1245, 578, 1898, 884, 3304, 203, 377, 380, 316, 326, 11863, 1014, 18, 1220, 13041, 716, 326, 15540, 471, 884, 3304, 854, 316, 17, 8389, 18, 203, 377, 380, 1220, 19808, 29380, 358, 9876, 12063, 11850, 4124, 261, 73, 18, 75, 18, 4982, 20649, 20422, 434, 392, 2521, 2934, 203, 377, 380, 203, 377, 380, 632, 891, 2488, 8428, 4047, 861, 22178, 2047, 1682, 3304, 4786, 203, 377, 380, 5411, 9363, 11016, 2488, 3792, 310, 15540, 471, 884, 3304, 622, 11850, 261, 6671, 203, 377, 380, 5411, 10313, 2934, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 380, 632, 2463, 2 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withMaxLeasesForWorker
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withMaxLeasesForWorker(int maxLeasesForWorker) { checkIsValuePositive("maxLeasesForWorker", maxLeasesForWorker); this.maxLeasesForWorker = maxLeasesForWorker; return this; }
/** * Worker will not acquire more than the specified max number of leases even if there are more * shards that need to be processed. This can be used in scenarios where a worker is resource constrained or * to prevent lease thrashing when small number of workers pick up all leases for small amount of time during * deployment. * Note that setting a low value may cause data loss (e.g. if there aren't enough Workers to make progress on all * shards). When setting the value for this property, one must ensure enough workers are present to process * shards and should consider future resharding, child shards that may be blocked on parent shards, some workers * becoming unhealthy, etc. * * @param maxLeasesForWorker * Max leases this Worker can handle at a time * @return KinesisClientLibConfiguration */
Worker will not acquire more than the specified max number of leases even if there are more shards that need to be processed. This can be used in scenarios where a worker is resource constrained or to prevent lease thrashing when small number of workers pick up all leases for small amount of time during deployment. Note that setting a low value may cause data loss . When setting the value for this property, one must ensure enough workers are present to process shards and should consider future resharding, child shards that may be blocked on parent shards, some workers becoming unhealthy, etc. @param maxLeasesForWorker Max leases this Worker can handle at a time @return KinesisClientLibConfiguration
[ "Worker", "will", "not", "acquire", "more", "than", "the", "specified", "max", "number", "of", "leases", "even", "if", "there", "are", "more", "shards", "that", "need", "to", "be", "processed", ".", "This", "can", "be", "used", "in", "scenarios", "where", "a", "worker", "is", "resource", "constrained", "or", "to", "prevent", "lease", "thrashing", "when", "small", "number", "of", "workers", "pick", "up", "all", "leases", "for", "small", "amount", "of", "time", "during", "deployment", ".", "Note", "that", "setting", "a", "low", "value", "may", "cause", "data", "loss", ".", "When", "setting", "the", "value", "for", "this", "property", "one", "must", "ensure", "enough", "workers", "are", "present", "to", "process", "shards", "and", "should", "consider", "future", "resharding", "child", "shards", "that", "may", "be", "blocked", "on", "parent", "shards", "some", "workers", "becoming", "unhealthy", "etc", ".", "@param", "maxLeasesForWorker", "Max", "leases", "this", "Worker", "can", "handle", "at", "a", "time", "@return", "KinesisClientLibConfiguration" ]
public KinesisClientLibConfiguration withMaxLeasesForWorker(int maxLeasesForWorker) { checkIsValuePositive("maxLeasesForWorker", maxLeasesForWorker); this.maxLeasesForWorker = maxLeasesForWorker; return this; }
[ "public", "KinesisClientLibConfiguration", "withMaxLeasesForWorker", "(", "int", "maxLeasesForWorker", ")", "{", "checkIsValuePositive", "(", "\"maxLeasesForWorker\"", ",", "maxLeasesForWorker", ")", ";", "this", ".", "maxLeasesForWorker", "=", "maxLeasesForWorker", ";", "return", "this", ";", "}" ]
Worker will not acquire more than the specified max number of leases even if there are more shards that need to be processed.
[ "Worker", "will", "not", "acquire", "more", "than", "the", "specified", "max", "number", "of", "leases", "even", "if", "there", "are", "more", "shards", "that", "need", "to", "be", "processed", "." ]
[]
[ { "param": "maxLeasesForWorker", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "maxLeasesForWorker", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 2747, 1682, 3304, 1290, 6671, 12, 474, 943, 1682, 3304, 1290, 6671, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 1896, 1682, 3304, 1290, 6671, 3113, 943, 1682, 3304, 1290, 6671, 1769, 203, 3639, 333, 18, 1896, 1682, 3304, 1290, 6671, 273, 943, 1682, 3304, 1290, 6671, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 11016, 903, 486, 10533, 1898, 2353, 326, 1269, 943, 1300, 434, 884, 3304, 5456, 309, 1915, 854, 1898, 203, 377, 380, 15540, 716, 1608, 358, 506, 5204, 18, 1220, 848, 506, 1399, 316, 22456, 1625, 279, 4322, 353, 1058, 27666, 578, 203, 377, 380, 358, 5309, 11863, 29142, 961, 310, 1347, 5264, 1300, 434, 9798, 6002, 731, 777, 884, 3304, 364, 5264, 3844, 434, 813, 4982, 203, 377, 380, 6314, 18, 203, 377, 380, 3609, 716, 3637, 279, 4587, 460, 2026, 4620, 501, 8324, 261, 73, 18, 75, 18, 309, 1915, 11526, 1404, 7304, 4147, 414, 358, 1221, 4007, 603, 777, 203, 377, 380, 15540, 2934, 5203, 3637, 326, 460, 364, 333, 1272, 16, 1245, 1297, 3387, 7304, 9798, 854, 3430, 358, 2 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withMaxLeasesToStealAtOneTime
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withMaxLeasesToStealAtOneTime(int maxLeasesToStealAtOneTime) { checkIsValuePositive("maxLeasesToStealAtOneTime", maxLeasesToStealAtOneTime); this.maxLeasesToStealAtOneTime = maxLeasesToStealAtOneTime; return this; }
/** * Max leases to steal from a more loaded Worker at one time (for load balancing). * Setting this to a higher number can allow for faster load convergence (e.g. during deployments, cold starts), * but can cause higher churn in the system. * * @param maxLeasesToStealAtOneTime * Steal up to this many leases at one time (for load balancing) * @return KinesisClientLibConfiguration */
Max leases to steal from a more loaded Worker at one time (for load balancing). Setting this to a higher number can allow for faster load convergence , but can cause higher churn in the system. @param maxLeasesToStealAtOneTime Steal up to this many leases at one time (for load balancing) @return KinesisClientLibConfiguration
[ "Max", "leases", "to", "steal", "from", "a", "more", "loaded", "Worker", "at", "one", "time", "(", "for", "load", "balancing", ")", ".", "Setting", "this", "to", "a", "higher", "number", "can", "allow", "for", "faster", "load", "convergence", "but", "can", "cause", "higher", "churn", "in", "the", "system", ".", "@param", "maxLeasesToStealAtOneTime", "Steal", "up", "to", "this", "many", "leases", "at", "one", "time", "(", "for", "load", "balancing", ")", "@return", "KinesisClientLibConfiguration" ]
public KinesisClientLibConfiguration withMaxLeasesToStealAtOneTime(int maxLeasesToStealAtOneTime) { checkIsValuePositive("maxLeasesToStealAtOneTime", maxLeasesToStealAtOneTime); this.maxLeasesToStealAtOneTime = maxLeasesToStealAtOneTime; return this; }
[ "public", "KinesisClientLibConfiguration", "withMaxLeasesToStealAtOneTime", "(", "int", "maxLeasesToStealAtOneTime", ")", "{", "checkIsValuePositive", "(", "\"maxLeasesToStealAtOneTime\"", ",", "maxLeasesToStealAtOneTime", ")", ";", "this", ".", "maxLeasesToStealAtOneTime", "=", "maxLeasesToStealAtOneTime", ";", "return", "this", ";", "}" ]
Max leases to steal from a more loaded Worker at one time (for load balancing).
[ "Max", "leases", "to", "steal", "from", "a", "more", "loaded", "Worker", "at", "one", "time", "(", "for", "load", "balancing", ")", "." ]
[]
[ { "param": "maxLeasesToStealAtOneTime", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "maxLeasesToStealAtOneTime", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 2747, 1682, 3304, 774, 510, 73, 287, 861, 3335, 950, 12, 474, 943, 1682, 3304, 774, 510, 73, 287, 861, 3335, 950, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 1896, 1682, 3304, 774, 510, 73, 287, 861, 3335, 950, 3113, 943, 1682, 3304, 774, 510, 73, 287, 861, 3335, 950, 1769, 203, 3639, 333, 18, 1896, 1682, 3304, 774, 510, 73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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 4238, 884, 3304, 358, 18654, 287, 628, 279, 1898, 4203, 11016, 622, 1245, 813, 261, 1884, 1262, 324, 16142, 2934, 203, 377, 380, 13274, 333, 358, 279, 10478, 1300, 848, 1699, 364, 12063, 1262, 25200, 261, 73, 18, 75, 18, 4982, 20422, 16, 645, 72, 2542, 3631, 203, 377, 380, 1496, 848, 4620, 10478, 462, 321, 316, 326, 2619, 18, 203, 377, 380, 203, 377, 380, 632, 891, 943, 1682, 3304, 774, 510, 73, 287, 861, 3335, 950, 203, 377, 380, 5411, 7780, 287, 731, 358, 333, 4906, 884, 3304, 622, 1245, 813, 261, 1884, 1262, 324, 16142, 13, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withInitialLeaseTableReadCapacity
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withInitialLeaseTableReadCapacity(int initialLeaseTableReadCapacity) { checkIsValuePositive("initialLeaseTableReadCapacity", initialLeaseTableReadCapacity); this.initialLeaseTableReadCapacity = initialLeaseTableReadCapacity; return this; }
/** * @param initialLeaseTableReadCapacity * Read capacity to provision when creating the lease table. * @return KinesisClientLibConfiguration */
@param initialLeaseTableReadCapacity Read capacity to provision when creating the lease table.
[ "@param", "initialLeaseTableReadCapacity", "Read", "capacity", "to", "provision", "when", "creating", "the", "lease", "table", "." ]
public KinesisClientLibConfiguration withInitialLeaseTableReadCapacity(int initialLeaseTableReadCapacity) { checkIsValuePositive("initialLeaseTableReadCapacity", initialLeaseTableReadCapacity); this.initialLeaseTableReadCapacity = initialLeaseTableReadCapacity; return this; }
[ "public", "KinesisClientLibConfiguration", "withInitialLeaseTableReadCapacity", "(", "int", "initialLeaseTableReadCapacity", ")", "{", "checkIsValuePositive", "(", "\"initialLeaseTableReadCapacity\"", ",", "initialLeaseTableReadCapacity", ")", ";", "this", ".", "initialLeaseTableReadCapacity", "=", "initialLeaseTableReadCapacity", ";", "return", "this", ";", "}" ]
@param initialLeaseTableReadCapacity Read capacity to provision when creating the lease table.
[ "@param", "initialLeaseTableReadCapacity", "Read", "capacity", "to", "provision", "when", "creating", "the", "lease", "table", "." ]
[]
[ { "param": "initialLeaseTableReadCapacity", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "initialLeaseTableReadCapacity", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 4435, 17746, 1388, 1994, 7437, 12, 474, 2172, 17746, 1388, 1994, 7437, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 6769, 17746, 1388, 1994, 7437, 3113, 2172, 17746, 1388, 1994, 7437, 1769, 203, 3639, 333, 18, 6769, 17746, 1388, 1994, 7437, 273, 2172, 17746, 1388, 1994, 7437, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 2172, 17746, 1388, 1994, 7437, 203, 377, 380, 5411, 2720, 7519, 358, 10595, 1347, 4979, 326, 11863, 1014, 18, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withInitialLeaseTableWriteCapacity
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withInitialLeaseTableWriteCapacity(int initialLeaseTableWriteCapacity) { checkIsValuePositive("initialLeaseTableWriteCapacity", initialLeaseTableWriteCapacity); this.initialLeaseTableWriteCapacity = initialLeaseTableWriteCapacity; return this; }
/** * @param initialLeaseTableWriteCapacity * Write capacity to provision when creating the lease table. * @return KinesisClientLibConfiguration */
@param initialLeaseTableWriteCapacity Write capacity to provision when creating the lease table.
[ "@param", "initialLeaseTableWriteCapacity", "Write", "capacity", "to", "provision", "when", "creating", "the", "lease", "table", "." ]
public KinesisClientLibConfiguration withInitialLeaseTableWriteCapacity(int initialLeaseTableWriteCapacity) { checkIsValuePositive("initialLeaseTableWriteCapacity", initialLeaseTableWriteCapacity); this.initialLeaseTableWriteCapacity = initialLeaseTableWriteCapacity; return this; }
[ "public", "KinesisClientLibConfiguration", "withInitialLeaseTableWriteCapacity", "(", "int", "initialLeaseTableWriteCapacity", ")", "{", "checkIsValuePositive", "(", "\"initialLeaseTableWriteCapacity\"", ",", "initialLeaseTableWriteCapacity", ")", ";", "this", ".", "initialLeaseTableWriteCapacity", "=", "initialLeaseTableWriteCapacity", ";", "return", "this", ";", "}" ]
@param initialLeaseTableWriteCapacity Write capacity to provision when creating the lease table.
[ "@param", "initialLeaseTableWriteCapacity", "Write", "capacity", "to", "provision", "when", "creating", "the", "lease", "table", "." ]
[]
[ { "param": "initialLeaseTableWriteCapacity", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "initialLeaseTableWriteCapacity", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 4435, 17746, 1388, 3067, 7437, 12, 474, 2172, 17746, 1388, 3067, 7437, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 6769, 17746, 1388, 3067, 7437, 3113, 2172, 17746, 1388, 3067, 7437, 1769, 203, 3639, 333, 18, 6769, 17746, 1388, 3067, 7437, 273, 2172, 17746, 1388, 3067, 7437, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 2172, 17746, 1388, 3067, 7437, 203, 377, 380, 5411, 2598, 7519, 358, 10595, 1347, 4979, 326, 11863, 1014, 18, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withShardPrioritizationStrategy
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withShardPrioritizationStrategy(ShardPrioritization shardPrioritization) { if (shardPrioritization == null) { throw new IllegalArgumentException("shardPrioritization cannot be null"); } this.shardPrioritization = shardPrioritization; return this; }
/** * @param shardPrioritization * Implementation of ShardPrioritization interface that should be used during processing. * @return KinesisClientLibConfiguration */
@param shardPrioritization Implementation of ShardPrioritization interface that should be used during processing.
[ "@param", "shardPrioritization", "Implementation", "of", "ShardPrioritization", "interface", "that", "should", "be", "used", "during", "processing", "." ]
public KinesisClientLibConfiguration withShardPrioritizationStrategy(ShardPrioritization shardPrioritization) { if (shardPrioritization == null) { throw new IllegalArgumentException("shardPrioritization cannot be null"); } this.shardPrioritization = shardPrioritization; return this; }
[ "public", "KinesisClientLibConfiguration", "withShardPrioritizationStrategy", "(", "ShardPrioritization", "shardPrioritization", ")", "{", "if", "(", "shardPrioritization", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"shardPrioritization cannot be null\"", ")", ";", "}", "this", ".", "shardPrioritization", "=", "shardPrioritization", ";", "return", "this", ";", "}" ]
@param shardPrioritization Implementation of ShardPrioritization interface that should be used during processing.
[ "@param", "shardPrioritization", "Implementation", "of", "ShardPrioritization", "interface", "that", "should", "be", "used", "during", "processing", "." ]
[]
[ { "param": "shardPrioritization", "type": "ShardPrioritization" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "shardPrioritization", "type": "ShardPrioritization", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 8428, 25355, 305, 1588, 4525, 12, 8428, 25355, 305, 1588, 5820, 25355, 305, 1588, 13, 288, 203, 3639, 309, 261, 22630, 25355, 305, 1588, 422, 446, 13, 288, 203, 5411, 604, 394, 2754, 2932, 22630, 25355, 305, 1588, 2780, 506, 446, 8863, 203, 3639, 289, 203, 3639, 333, 18, 22630, 25355, 305, 1588, 273, 5820, 25355, 305, 1588, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 380, 5411, 25379, 434, 16490, 25355, 305, 1588, 1560, 716, 1410, 506, 1399, 4982, 4929, 18, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withMaxLeaseRenewalThreads
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withMaxLeaseRenewalThreads(int maxLeaseRenewalThreads) { Validate.isTrue(maxLeaseRenewalThreads > 2, "The maximum number of lease renewal threads must be greater than or equal to 2."); this.maxLeaseRenewalThreads = maxLeaseRenewalThreads; return this; }
/** * Sets the size of the thread pool that will be used to renew leases. * * Setting this to low may starve the lease renewal process, and cause the worker to lose leases at a higher rate. * * @param maxLeaseRenewalThreads * the maximum size of the lease renewal thread pool * @throws IllegalArgumentException * if maxLeaseRenewalThreads is <= 0 * @return this configuration object */
Sets the size of the thread pool that will be used to renew leases. Setting this to low may starve the lease renewal process, and cause the worker to lose leases at a higher rate. @param maxLeaseRenewalThreads the maximum size of the lease renewal thread pool @throws IllegalArgumentException if maxLeaseRenewalThreads is <= 0 @return this configuration object
[ "Sets", "the", "size", "of", "the", "thread", "pool", "that", "will", "be", "used", "to", "renew", "leases", ".", "Setting", "this", "to", "low", "may", "starve", "the", "lease", "renewal", "process", "and", "cause", "the", "worker", "to", "lose", "leases", "at", "a", "higher", "rate", ".", "@param", "maxLeaseRenewalThreads", "the", "maximum", "size", "of", "the", "lease", "renewal", "thread", "pool", "@throws", "IllegalArgumentException", "if", "maxLeaseRenewalThreads", "is", "<", "=", "0", "@return", "this", "configuration", "object" ]
public KinesisClientLibConfiguration withMaxLeaseRenewalThreads(int maxLeaseRenewalThreads) { Validate.isTrue(maxLeaseRenewalThreads > 2, "The maximum number of lease renewal threads must be greater than or equal to 2."); this.maxLeaseRenewalThreads = maxLeaseRenewalThreads; return this; }
[ "public", "KinesisClientLibConfiguration", "withMaxLeaseRenewalThreads", "(", "int", "maxLeaseRenewalThreads", ")", "{", "Validate", ".", "isTrue", "(", "maxLeaseRenewalThreads", ">", "2", ",", "\"The maximum number of lease renewal threads must be greater than or equal to 2.\"", ")", ";", "this", ".", "maxLeaseRenewalThreads", "=", "maxLeaseRenewalThreads", ";", "return", "this", ";", "}" ]
Sets the size of the thread pool that will be used to renew leases.
[ "Sets", "the", "size", "of", "the", "thread", "pool", "that", "will", "be", "used", "to", "renew", "leases", "." ]
[]
[ { "param": "maxLeaseRenewalThreads", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "maxLeaseRenewalThreads", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 2747, 17746, 24058, 287, 13233, 12, 474, 943, 17746, 24058, 287, 13233, 13, 288, 203, 3639, 3554, 18, 291, 5510, 12, 1896, 17746, 24058, 287, 13233, 405, 576, 16, 203, 7734, 315, 1986, 4207, 1300, 434, 11863, 15723, 287, 7403, 1297, 506, 6802, 2353, 578, 3959, 358, 576, 1199, 1769, 203, 3639, 333, 18, 1896, 17746, 24058, 287, 13233, 273, 943, 17746, 24058, 287, 13233, 31, 203, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 11511, 326, 963, 434, 326, 2650, 2845, 716, 903, 506, 1399, 358, 15723, 884, 3304, 18, 203, 377, 380, 203, 377, 380, 13274, 333, 358, 4587, 2026, 10443, 537, 326, 11863, 15723, 287, 1207, 16, 471, 4620, 326, 4322, 358, 29612, 884, 3304, 622, 279, 10478, 4993, 18, 203, 377, 380, 203, 377, 380, 632, 891, 943, 17746, 24058, 287, 13233, 203, 377, 380, 5411, 326, 4207, 963, 434, 326, 11863, 15723, 287, 2650, 2845, 203, 377, 380, 632, 15069, 2754, 203, 377, 380, 2398, 309, 943, 17746, 24058, 287, 13233, 353, 1648, 374, 203, 377, 380, 632, 2463, 333, 1664, 733, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withRetryGetRecordsInSeconds
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withRetryGetRecordsInSeconds(final int retryGetRecordsInSeconds) { checkIsValuePositive("retryGetRecordsInSeconds", retryGetRecordsInSeconds); this.retryGetRecordsInSeconds = Optional.of(retryGetRecordsInSeconds); return this; }
/** * @param retryGetRecordsInSeconds * the time in seconds to wait before the worker retries to get a record. * @return this configuration object. */
@param retryGetRecordsInSeconds the time in seconds to wait before the worker retries to get a record. @return this configuration object.
[ "@param", "retryGetRecordsInSeconds", "the", "time", "in", "seconds", "to", "wait", "before", "the", "worker", "retries", "to", "get", "a", "record", ".", "@return", "this", "configuration", "object", "." ]
public KinesisClientLibConfiguration withRetryGetRecordsInSeconds(final int retryGetRecordsInSeconds) { checkIsValuePositive("retryGetRecordsInSeconds", retryGetRecordsInSeconds); this.retryGetRecordsInSeconds = Optional.of(retryGetRecordsInSeconds); return this; }
[ "public", "KinesisClientLibConfiguration", "withRetryGetRecordsInSeconds", "(", "final", "int", "retryGetRecordsInSeconds", ")", "{", "checkIsValuePositive", "(", "\"retryGetRecordsInSeconds\"", ",", "retryGetRecordsInSeconds", ")", ";", "this", ".", "retryGetRecordsInSeconds", "=", "Optional", ".", "of", "(", "retryGetRecordsInSeconds", ")", ";", "return", "this", ";", "}" ]
@param retryGetRecordsInSeconds the time in seconds to wait before the worker retries to get a record.
[ "@param", "retryGetRecordsInSeconds", "the", "time", "in", "seconds", "to", "wait", "before", "the", "worker", "retries", "to", "get", "a", "record", "." ]
[]
[ { "param": "retryGetRecordsInSeconds", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "retryGetRecordsInSeconds", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 7539, 967, 6499, 17840, 12, 6385, 509, 3300, 967, 6499, 17840, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 9620, 967, 6499, 17840, 3113, 3300, 967, 6499, 17840, 1769, 203, 3639, 333, 18, 9620, 967, 6499, 17840, 273, 4055, 18, 792, 12, 9620, 967, 6499, 17840, 1769, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 3300, 967, 6499, 17840, 203, 377, 380, 5411, 326, 813, 316, 3974, 358, 2529, 1865, 326, 4322, 9453, 358, 336, 279, 1409, 18, 203, 377, 380, 632, 2463, 333, 1664, 733, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withMaxGetRecordsThreadPool
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withMaxGetRecordsThreadPool(final int maxGetRecordsThreadPool) { checkIsValuePositive("maxGetRecordsThreadPool", maxGetRecordsThreadPool); this.maxGetRecordsThreadPool = Optional.of(maxGetRecordsThreadPool); return this; }
/** * @param maxGetRecordsThreadPool * the max number of threads in the getRecords thread pool. * @return this configuration object */
@param maxGetRecordsThreadPool the max number of threads in the getRecords thread pool. @return this configuration object
[ "@param", "maxGetRecordsThreadPool", "the", "max", "number", "of", "threads", "in", "the", "getRecords", "thread", "pool", ".", "@return", "this", "configuration", "object" ]
public KinesisClientLibConfiguration withMaxGetRecordsThreadPool(final int maxGetRecordsThreadPool) { checkIsValuePositive("maxGetRecordsThreadPool", maxGetRecordsThreadPool); this.maxGetRecordsThreadPool = Optional.of(maxGetRecordsThreadPool); return this; }
[ "public", "KinesisClientLibConfiguration", "withMaxGetRecordsThreadPool", "(", "final", "int", "maxGetRecordsThreadPool", ")", "{", "checkIsValuePositive", "(", "\"maxGetRecordsThreadPool\"", ",", "maxGetRecordsThreadPool", ")", ";", "this", ".", "maxGetRecordsThreadPool", "=", "Optional", ".", "of", "(", "maxGetRecordsThreadPool", ")", ";", "return", "this", ";", "}" ]
@param maxGetRecordsThreadPool the max number of threads in the getRecords thread pool.
[ "@param", "maxGetRecordsThreadPool", "the", "max", "number", "of", "threads", "in", "the", "getRecords", "thread", "pool", "." ]
[]
[ { "param": "maxGetRecordsThreadPool", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "maxGetRecordsThreadPool", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 2747, 967, 6499, 20621, 12, 6385, 509, 943, 967, 6499, 20621, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 1896, 967, 6499, 20621, 3113, 943, 967, 6499, 20621, 1769, 203, 3639, 333, 18, 1896, 967, 6499, 20621, 273, 4055, 18, 792, 12, 1896, 967, 6499, 20621, 1769, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 943, 967, 6499, 20621, 203, 377, 380, 5411, 326, 943, 1300, 434, 7403, 316, 326, 336, 6499, 2650, 2845, 18, 203, 377, 380, 632, 2463, 333, 1664, 733, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withMaxPendingProcessRecordsInput
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withMaxPendingProcessRecordsInput(final int maxPendingProcessRecordsInput) { checkIsValuePositive("maxPendingProcessRecordsInput", maxPendingProcessRecordsInput); this.recordsFetcherFactory.maxPendingProcessRecordsInput(maxPendingProcessRecordsInput); return this; }
/** * * @param maxPendingProcessRecordsInput * The max number of ProcessRecordsInput that can be stored in the cache before * blocking * @return this configuration object */
@param maxPendingProcessRecordsInput The max number of ProcessRecordsInput that can be stored in the cache before blocking @return this configuration object
[ "@param", "maxPendingProcessRecordsInput", "The", "max", "number", "of", "ProcessRecordsInput", "that", "can", "be", "stored", "in", "the", "cache", "before", "blocking", "@return", "this", "configuration", "object" ]
public KinesisClientLibConfiguration withMaxPendingProcessRecordsInput(final int maxPendingProcessRecordsInput) { checkIsValuePositive("maxPendingProcessRecordsInput", maxPendingProcessRecordsInput); this.recordsFetcherFactory.maxPendingProcessRecordsInput(maxPendingProcessRecordsInput); return this; }
[ "public", "KinesisClientLibConfiguration", "withMaxPendingProcessRecordsInput", "(", "final", "int", "maxPendingProcessRecordsInput", ")", "{", "checkIsValuePositive", "(", "\"maxPendingProcessRecordsInput\"", ",", "maxPendingProcessRecordsInput", ")", ";", "this", ".", "recordsFetcherFactory", ".", "maxPendingProcessRecordsInput", "(", "maxPendingProcessRecordsInput", ")", ";", "return", "this", ";", "}" ]
@param maxPendingProcessRecordsInput The max number of ProcessRecordsInput that can be stored in the cache before blocking @return this configuration object
[ "@param", "maxPendingProcessRecordsInput", "The", "max", "number", "of", "ProcessRecordsInput", "that", "can", "be", "stored", "in", "the", "cache", "before", "blocking", "@return", "this", "configuration", "object" ]
[]
[ { "param": "maxPendingProcessRecordsInput", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "maxPendingProcessRecordsInput", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 2747, 8579, 2227, 6499, 1210, 12, 6385, 509, 943, 8579, 2227, 6499, 1210, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 1896, 8579, 2227, 6499, 1210, 3113, 943, 8579, 2227, 6499, 1210, 1769, 203, 3639, 333, 18, 7094, 16855, 1733, 18, 1896, 8579, 2227, 6499, 1210, 12, 1896, 8579, 2227, 6499, 1210, 1769, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 203, 377, 380, 632, 891, 943, 8579, 2227, 6499, 1210, 203, 377, 380, 5411, 1021, 943, 1300, 434, 4389, 6499, 1210, 716, 848, 506, 4041, 316, 326, 1247, 1865, 203, 377, 380, 5411, 9445, 203, 377, 380, 632, 2463, 333, 1664, 733, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withMaxCacheByteSize
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withMaxCacheByteSize(final int maxCacheByteSize) { checkIsValuePositive("maxCacheByteSize", maxCacheByteSize); this.recordsFetcherFactory.maxByteSize(maxCacheByteSize); return this; }
/** * @param maxCacheByteSize * Max byte size for the cache at any given point of time. After this threshold is crossed * the KinesisDataFetcher will be blocked until the cache has more space available. * @return KinesisClientLibConfiguration */
@param maxCacheByteSize Max byte size for the cache at any given point of time. After this threshold is crossed the KinesisDataFetcher will be blocked until the cache has more space available.
[ "@param", "maxCacheByteSize", "Max", "byte", "size", "for", "the", "cache", "at", "any", "given", "point", "of", "time", ".", "After", "this", "threshold", "is", "crossed", "the", "KinesisDataFetcher", "will", "be", "blocked", "until", "the", "cache", "has", "more", "space", "available", "." ]
public KinesisClientLibConfiguration withMaxCacheByteSize(final int maxCacheByteSize) { checkIsValuePositive("maxCacheByteSize", maxCacheByteSize); this.recordsFetcherFactory.maxByteSize(maxCacheByteSize); return this; }
[ "public", "KinesisClientLibConfiguration", "withMaxCacheByteSize", "(", "final", "int", "maxCacheByteSize", ")", "{", "checkIsValuePositive", "(", "\"maxCacheByteSize\"", ",", "maxCacheByteSize", ")", ";", "this", ".", "recordsFetcherFactory", ".", "maxByteSize", "(", "maxCacheByteSize", ")", ";", "return", "this", ";", "}" ]
@param maxCacheByteSize Max byte size for the cache at any given point of time.
[ "@param", "maxCacheByteSize", "Max", "byte", "size", "for", "the", "cache", "at", "any", "given", "point", "of", "time", "." ]
[]
[ { "param": "maxCacheByteSize", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "maxCacheByteSize", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 2747, 1649, 3216, 1225, 12, 6385, 509, 943, 1649, 3216, 1225, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 1896, 1649, 3216, 1225, 3113, 943, 1649, 3216, 1225, 1769, 203, 3639, 333, 18, 7094, 16855, 1733, 18, 1896, 3216, 1225, 12, 1896, 1649, 3216, 1225, 1769, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 943, 1649, 3216, 1225, 203, 377, 380, 5411, 4238, 1160, 963, 364, 326, 1247, 622, 1281, 864, 1634, 434, 813, 18, 7360, 333, 5573, 353, 30783, 730, 203, 377, 380, 5411, 326, 17291, 751, 16855, 903, 506, 14547, 3180, 326, 1247, 711, 1898, 3476, 2319, 18, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withMaxRecordsCount
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withMaxRecordsCount(final int maxRecordsCount) { checkIsValuePositive("maxRecordsCount", maxRecordsCount); this.recordsFetcherFactory.maxRecordsCount(maxRecordsCount); return this; }
/** * @param maxRecordsCount * The maximum number of records in the cache, accross all ProcessRecordInput objects * @return KinesisClientLibConfiguration */
@param maxRecordsCount The maximum number of records in the cache, accross all ProcessRecordInput objects @return KinesisClientLibConfiguration
[ "@param", "maxRecordsCount", "The", "maximum", "number", "of", "records", "in", "the", "cache", "accross", "all", "ProcessRecordInput", "objects", "@return", "KinesisClientLibConfiguration" ]
public KinesisClientLibConfiguration withMaxRecordsCount(final int maxRecordsCount) { checkIsValuePositive("maxRecordsCount", maxRecordsCount); this.recordsFetcherFactory.maxRecordsCount(maxRecordsCount); return this; }
[ "public", "KinesisClientLibConfiguration", "withMaxRecordsCount", "(", "final", "int", "maxRecordsCount", ")", "{", "checkIsValuePositive", "(", "\"maxRecordsCount\"", ",", "maxRecordsCount", ")", ";", "this", ".", "recordsFetcherFactory", ".", "maxRecordsCount", "(", "maxRecordsCount", ")", ";", "return", "this", ";", "}" ]
@param maxRecordsCount The maximum number of records in the cache, accross all ProcessRecordInput objects @return KinesisClientLibConfiguration
[ "@param", "maxRecordsCount", "The", "maximum", "number", "of", "records", "in", "the", "cache", "accross", "all", "ProcessRecordInput", "objects", "@return", "KinesisClientLibConfiguration" ]
[]
[ { "param": "maxRecordsCount", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "maxRecordsCount", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 2747, 6499, 1380, 12, 6385, 509, 943, 6499, 1380, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 1896, 6499, 1380, 3113, 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 16, 4078, 3984, 777, 4389, 2115, 1210, 2184, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withShutdownGraceMillis
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withShutdownGraceMillis(long shutdownGraceMillis) { checkIsValuePositive("ShutdownGraceMillis", shutdownGraceMillis); this.shutdownGraceMillis = shutdownGraceMillis; return this; }
/** * @param shutdownGraceMillis * Time before gracefully shutdown forcefully terminates * @return KinesisClientLibConfiguration */
@param shutdownGraceMillis Time before gracefully shutdown forcefully terminates @return KinesisClientLibConfiguration
[ "@param", "shutdownGraceMillis", "Time", "before", "gracefully", "shutdown", "forcefully", "terminates", "@return", "KinesisClientLibConfiguration" ]
public KinesisClientLibConfiguration withShutdownGraceMillis(long shutdownGraceMillis) { checkIsValuePositive("ShutdownGraceMillis", shutdownGraceMillis); this.shutdownGraceMillis = shutdownGraceMillis; return this; }
[ "public", "KinesisClientLibConfiguration", "withShutdownGraceMillis", "(", "long", "shutdownGraceMillis", ")", "{", "checkIsValuePositive", "(", "\"ShutdownGraceMillis\"", ",", "shutdownGraceMillis", ")", ";", "this", ".", "shutdownGraceMillis", "=", "shutdownGraceMillis", ";", "return", "this", ";", "}" ]
@param shutdownGraceMillis Time before gracefully shutdown forcefully terminates @return KinesisClientLibConfiguration
[ "@param", "shutdownGraceMillis", "Time", "before", "gracefully", "shutdown", "forcefully", "terminates", "@return", "KinesisClientLibConfiguration" ]
[]
[ { "param": "shutdownGraceMillis", "type": "long" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "shutdownGraceMillis", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 10961, 24443, 4814, 12, 5748, 5731, 24443, 4814, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 10961, 24443, 4814, 3113, 5731, 24443, 4814, 1769, 203, 3639, 333, 18, 15132, 24443, 4814, 273, 5731, 24443, 4814, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 5731, 24443, 4814, 203, 377, 380, 5411, 2647, 1865, 25063, 5731, 2944, 4095, 30559, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withIdleMillisBetweenCalls
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withIdleMillisBetweenCalls(long idleMillisBetweenCalls) { checkIsValuePositive("IdleMillisBetweenCalls", idleMillisBetweenCalls); this.recordsFetcherFactory.idleMillisBetweenCalls(idleMillisBetweenCalls); return this; }
/** * @param idleMillisBetweenCalls * Idle time between 2 getcalls from the data fetcher. * @return KinesisClientLibConfiguration */
@param idleMillisBetweenCalls Idle time between 2 getcalls from the data fetcher.
[ "@param", "idleMillisBetweenCalls", "Idle", "time", "between", "2", "getcalls", "from", "the", "data", "fetcher", "." ]
public KinesisClientLibConfiguration withIdleMillisBetweenCalls(long idleMillisBetweenCalls) { checkIsValuePositive("IdleMillisBetweenCalls", idleMillisBetweenCalls); this.recordsFetcherFactory.idleMillisBetweenCalls(idleMillisBetweenCalls); return this; }
[ "public", "KinesisClientLibConfiguration", "withIdleMillisBetweenCalls", "(", "long", "idleMillisBetweenCalls", ")", "{", "checkIsValuePositive", "(", "\"IdleMillisBetweenCalls\"", ",", "idleMillisBetweenCalls", ")", ";", "this", ".", "recordsFetcherFactory", ".", "idleMillisBetweenCalls", "(", "idleMillisBetweenCalls", ")", ";", "return", "this", ";", "}" ]
@param idleMillisBetweenCalls Idle time between 2 getcalls from the data fetcher.
[ "@param", "idleMillisBetweenCalls", "Idle", "time", "between", "2", "getcalls", "from", "the", "data", "fetcher", "." ]
[]
[ { "param": "idleMillisBetweenCalls", "type": "long" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "idleMillisBetweenCalls", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 13834, 4814, 11831, 10125, 12, 5748, 12088, 4814, 11831, 10125, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 13834, 4814, 11831, 10125, 3113, 12088, 4814, 11831, 10125, 1769, 203, 3639, 333, 18, 7094, 16855, 1733, 18, 20390, 4814, 11831, 10125, 12, 20390, 4814, 11831, 10125, 1769, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 12088, 4814, 11831, 10125, 203, 377, 380, 5411, 28156, 813, 3086, 576, 336, 12550, 628, 326, 501, 20521, 18, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withLogWarningForTaskAfterMillis
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withLogWarningForTaskAfterMillis(long logWarningForTaskAfterMillis) { checkIsValuePositive("LogProcessTaskStatusAfterInMillis", logWarningForTaskAfterMillis); this.logWarningForTaskAfterMillis = Optional.of(logWarningForTaskAfterMillis); return this; }
/** * @param logWarningForTaskAfterMillis * Logs warn message if as task is held in a task for more than the set * time. * @return KinesisClientLibConfiguration */
@param logWarningForTaskAfterMillis Logs warn message if as task is held in a task for more than the set time.
[ "@param", "logWarningForTaskAfterMillis", "Logs", "warn", "message", "if", "as", "task", "is", "held", "in", "a", "task", "for", "more", "than", "the", "set", "time", "." ]
public KinesisClientLibConfiguration withLogWarningForTaskAfterMillis(long logWarningForTaskAfterMillis) { checkIsValuePositive("LogProcessTaskStatusAfterInMillis", logWarningForTaskAfterMillis); this.logWarningForTaskAfterMillis = Optional.of(logWarningForTaskAfterMillis); return this; }
[ "public", "KinesisClientLibConfiguration", "withLogWarningForTaskAfterMillis", "(", "long", "logWarningForTaskAfterMillis", ")", "{", "checkIsValuePositive", "(", "\"LogProcessTaskStatusAfterInMillis\"", ",", "logWarningForTaskAfterMillis", ")", ";", "this", ".", "logWarningForTaskAfterMillis", "=", "Optional", ".", "of", "(", "logWarningForTaskAfterMillis", ")", ";", "return", "this", ";", "}" ]
@param logWarningForTaskAfterMillis Logs warn message if as task is held in a task for more than the set time.
[ "@param", "logWarningForTaskAfterMillis", "Logs", "warn", "message", "if", "as", "task", "is", "held", "in", "a", "task", "for", "more", "than", "the", "set", "time", "." ]
[]
[ { "param": "logWarningForTaskAfterMillis", "type": "long" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "logWarningForTaskAfterMillis", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 1343, 6210, 1290, 2174, 4436, 4814, 12, 5748, 613, 6210, 1290, 2174, 4436, 4814, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 1343, 2227, 2174, 1482, 4436, 16620, 3113, 613, 6210, 1290, 2174, 4436, 4814, 1769, 203, 3639, 333, 18, 1330, 6210, 1290, 2174, 4436, 4814, 273, 4055, 18, 792, 12, 1330, 6210, 1290, 2174, 4436, 4814, 1769, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 613, 6210, 1290, 2174, 4436, 4814, 203, 377, 380, 5411, 20238, 1894, 883, 309, 487, 1562, 353, 15770, 316, 279, 1562, 364, 1898, 2353, 326, 444, 203, 377, 380, 5411, 813, 18, 203, 377, 380, 632, 2463, 17291, 1227, 5664, 1750, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withListShardsBackoffTimeInMillis
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withListShardsBackoffTimeInMillis(long listShardsBackoffTimeInMillis) { checkIsValuePositive("listShardsBackoffTimeInMillis", listShardsBackoffTimeInMillis); this.listShardsBackoffTimeInMillis = listShardsBackoffTimeInMillis; return this; }
/** * @param listShardsBackoffTimeInMillis * Max sleep between two listShards call when throttled * in KinesisProxy. * @return */
@param listShardsBackoffTimeInMillis Max sleep between two listShards call when throttled in KinesisProxy. @return
[ "@param", "listShardsBackoffTimeInMillis", "Max", "sleep", "between", "two", "listShards", "call", "when", "throttled", "in", "KinesisProxy", ".", "@return" ]
public KinesisClientLibConfiguration withListShardsBackoffTimeInMillis(long listShardsBackoffTimeInMillis) { checkIsValuePositive("listShardsBackoffTimeInMillis", listShardsBackoffTimeInMillis); this.listShardsBackoffTimeInMillis = listShardsBackoffTimeInMillis; return this; }
[ "public", "KinesisClientLibConfiguration", "withListShardsBackoffTimeInMillis", "(", "long", "listShardsBackoffTimeInMillis", ")", "{", "checkIsValuePositive", "(", "\"listShardsBackoffTimeInMillis\"", ",", "listShardsBackoffTimeInMillis", ")", ";", "this", ".", "listShardsBackoffTimeInMillis", "=", "listShardsBackoffTimeInMillis", ";", "return", "this", ";", "}" ]
@param listShardsBackoffTimeInMillis Max sleep between two listShards call when throttled in KinesisProxy.
[ "@param", "listShardsBackoffTimeInMillis", "Max", "sleep", "between", "two", "listShards", "call", "when", "throttled", "in", "KinesisProxy", "." ]
[]
[ { "param": "listShardsBackoffTimeInMillis", "type": "long" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "listShardsBackoffTimeInMillis", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 682, 15966, 16757, 950, 16620, 12, 5748, 666, 15966, 16757, 950, 16620, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 1098, 15966, 16757, 950, 16620, 3113, 666, 15966, 16757, 950, 16620, 1769, 203, 3639, 333, 18, 1098, 15966, 16757, 950, 16620, 273, 666, 15966, 16757, 950, 16620, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 666, 15966, 16757, 950, 16620, 203, 377, 380, 5411, 4238, 5329, 3086, 2795, 666, 15966, 745, 1347, 27335, 203, 377, 380, 5411, 316, 17291, 3886, 18, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withMaxListShardsRetryAttempts
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withMaxListShardsRetryAttempts(int maxListShardsRetryAttempts) { checkIsValuePositive("maxListShardsRetryAttempts", maxListShardsRetryAttempts); this.maxListShardsRetryAttempts = maxListShardsRetryAttempts; return this; }
/** * @param maxListShardsRetryAttempts * Max number of retries for listShards when throttled * in KinesisProxy. * @return */
@param maxListShardsRetryAttempts Max number of retries for listShards when throttled in KinesisProxy. @return
[ "@param", "maxListShardsRetryAttempts", "Max", "number", "of", "retries", "for", "listShards", "when", "throttled", "in", "KinesisProxy", ".", "@return" ]
public KinesisClientLibConfiguration withMaxListShardsRetryAttempts(int maxListShardsRetryAttempts) { checkIsValuePositive("maxListShardsRetryAttempts", maxListShardsRetryAttempts); this.maxListShardsRetryAttempts = maxListShardsRetryAttempts; return this; }
[ "public", "KinesisClientLibConfiguration", "withMaxListShardsRetryAttempts", "(", "int", "maxListShardsRetryAttempts", ")", "{", "checkIsValuePositive", "(", "\"maxListShardsRetryAttempts\"", ",", "maxListShardsRetryAttempts", ")", ";", "this", ".", "maxListShardsRetryAttempts", "=", "maxListShardsRetryAttempts", ";", "return", "this", ";", "}" ]
@param maxListShardsRetryAttempts Max number of retries for listShards when throttled in KinesisProxy.
[ "@param", "maxListShardsRetryAttempts", "Max", "number", "of", "retries", "for", "listShards", "when", "throttled", "in", "KinesisProxy", "." ]
[]
[ { "param": "maxListShardsRetryAttempts", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "maxListShardsRetryAttempts", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 2747, 682, 15966, 7539, 10113, 12, 474, 943, 682, 15966, 7539, 10113, 13, 288, 203, 3639, 866, 2520, 620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300, 434, 9453, 364, 666, 15966, 1347, 27335, 203, 377, 380, 5411, 316, 17291, 3886, 18, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
54797050b4a045fcfe5f45c16d966a6b9f456c7d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/coordinator/KinesisClientLibConfiguration.java
[ "Apache-2.0" ]
Java
withSchedulerInitializationBackoffTimeMillis
KinesisClientLibConfiguration
public KinesisClientLibConfiguration withSchedulerInitializationBackoffTimeMillis(long schedulerInitializationBackoffTimeMillis) { checkIsValuePositive("schedulerInitializationBackoffTimeMillis", schedulerInitializationBackoffTimeMillis); this.schedulerInitializationBackoffTimeMillis = schedulerInitializationBackoffTimeMillis; return this; }
/** * @param schedulerInitializationBackoffTimeMillis * Interval in milliseconds between retrying the scheduler initialization. * @return */
@param schedulerInitializationBackoffTimeMillis Interval in milliseconds between retrying the scheduler initialization. @return
[ "@param", "schedulerInitializationBackoffTimeMillis", "Interval", "in", "milliseconds", "between", "retrying", "the", "scheduler", "initialization", ".", "@return" ]
public KinesisClientLibConfiguration withSchedulerInitializationBackoffTimeMillis(long schedulerInitializationBackoffTimeMillis) { checkIsValuePositive("schedulerInitializationBackoffTimeMillis", schedulerInitializationBackoffTimeMillis); this.schedulerInitializationBackoffTimeMillis = schedulerInitializationBackoffTimeMillis; return this; }
[ "public", "KinesisClientLibConfiguration", "withSchedulerInitializationBackoffTimeMillis", "(", "long", "schedulerInitializationBackoffTimeMillis", ")", "{", "checkIsValuePositive", "(", "\"schedulerInitializationBackoffTimeMillis\"", ",", "schedulerInitializationBackoffTimeMillis", ")", ";", "this", ".", "schedulerInitializationBackoffTimeMillis", "=", "schedulerInitializationBackoffTimeMillis", ";", "return", "this", ";", "}" ]
@param schedulerInitializationBackoffTimeMillis Interval in milliseconds between retrying the scheduler initialization.
[ "@param", "schedulerInitializationBackoffTimeMillis", "Interval", "in", "milliseconds", "between", "retrying", "the", "scheduler", "initialization", "." ]
[]
[ { "param": "schedulerInitializationBackoffTimeMillis", "type": "long" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "schedulerInitializationBackoffTimeMillis", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 17291, 1227, 5664, 1750, 598, 11870, 17701, 16757, 28512, 12, 5748, 8129, 17701, 16757, 28512, 13, 288, 203, 3639, 866, 2520, 620, 14900, 2932, 19972, 17701, 16757, 28512, 3113, 8129, 17701, 16757, 28512, 1769, 203, 3639, 333, 18, 19972, 17701, 16757, 28512, 273, 8129, 17701, 16757, 28512, 31, 203, 3639, 327, 333, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 8129, 17701, 16757, 28512, 203, 377, 380, 5411, 10803, 316, 10993, 3086, 21081, 326, 8129, 10313, 18, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
46677fb9375b14645c8be2e5b17af1e6cbd4f30e
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/lifecycle/ShardConsumerTest.java
[ "Apache-2.0" ]
Java
testSuccessfulConsumerStateTransition
null
@SuppressWarnings("unchecked") @Test public final void testSuccessfulConsumerStateTransition() throws Exception { ExecutorService directExecutorService = spy(executorService); doAnswer(invocation -> directlyExecuteRunnable(invocation)) .when(directExecutorService).execute(any()); ShardConsumer consumer = new ShardConsumer(recordsPublisher, directExecutorService, shardInfo, logWarningForTaskAfterMillis, shardConsumerArgument, blockedOnParentsState, t -> t, 1, taskExecutionListener, 0); mockSuccessfulUnblockOnParents(); mockSuccessfulInitializeWithFailureTransition(); mockSuccessfulProcessing(null); int arbitraryExecutionCount = 3; do { try { consumer.executeLifecycle(); } catch (Exception e) { // Suppress any exception like the scheduler. fail("Unexpected exception while executing consumer lifecycle"); } } while (--arbitraryExecutionCount > 0); assertEquals(ShardConsumerState.PROCESSING.consumerState().state(), consumer.currentState().state()); verify(directExecutorService, times(2)).execute(any()); }
/** * Test method to verify consumer undergoes the transition WAITING_ON_PARENT_SHARDS -> INITIALIZING -> PROCESSING */
Test method to verify consumer undergoes the transition WAITING_ON_PARENT_SHARDS -> INITIALIZING -> PROCESSING
[ "Test", "method", "to", "verify", "consumer", "undergoes", "the", "transition", "WAITING_ON_PARENT_SHARDS", "-", ">", "INITIALIZING", "-", ">", "PROCESSING" ]
@SuppressWarnings("unchecked") @Test public final void testSuccessfulConsumerStateTransition() throws Exception { ExecutorService directExecutorService = spy(executorService); doAnswer(invocation -> directlyExecuteRunnable(invocation)) .when(directExecutorService).execute(any()); ShardConsumer consumer = new ShardConsumer(recordsPublisher, directExecutorService, shardInfo, logWarningForTaskAfterMillis, shardConsumerArgument, blockedOnParentsState, t -> t, 1, taskExecutionListener, 0); mockSuccessfulUnblockOnParents(); mockSuccessfulInitializeWithFailureTransition(); mockSuccessfulProcessing(null); int arbitraryExecutionCount = 3; do { try { consumer.executeLifecycle(); } catch (Exception e) { fail("Unexpected exception while executing consumer lifecycle"); } } while (--arbitraryExecutionCount > 0); assertEquals(ShardConsumerState.PROCESSING.consumerState().state(), consumer.currentState().state()); verify(directExecutorService, times(2)).execute(any()); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Test", "public", "final", "void", "testSuccessfulConsumerStateTransition", "(", ")", "throws", "Exception", "{", "ExecutorService", "directExecutorService", "=", "spy", "(", "executorService", ")", ";", "doAnswer", "(", "invocation", "->", "directlyExecuteRunnable", "(", "invocation", ")", ")", ".", "when", "(", "directExecutorService", ")", ".", "execute", "(", "any", "(", ")", ")", ";", "ShardConsumer", "consumer", "=", "new", "ShardConsumer", "(", "recordsPublisher", ",", "directExecutorService", ",", "shardInfo", ",", "logWarningForTaskAfterMillis", ",", "shardConsumerArgument", ",", "blockedOnParentsState", ",", "t", "->", "t", ",", "1", ",", "taskExecutionListener", ",", "0", ")", ";", "mockSuccessfulUnblockOnParents", "(", ")", ";", "mockSuccessfulInitializeWithFailureTransition", "(", ")", ";", "mockSuccessfulProcessing", "(", "null", ")", ";", "int", "arbitraryExecutionCount", "=", "3", ";", "do", "{", "try", "{", "consumer", ".", "executeLifecycle", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "fail", "(", "\"Unexpected exception while executing consumer lifecycle\"", ")", ";", "}", "}", "while", "(", "--", "arbitraryExecutionCount", ">", "0", ")", ";", "assertEquals", "(", "ShardConsumerState", ".", "PROCESSING", ".", "consumerState", "(", ")", ".", "state", "(", ")", ",", "consumer", ".", "currentState", "(", ")", ".", "state", "(", ")", ")", ";", "verify", "(", "directExecutorService", ",", "times", "(", "2", ")", ")", ".", "execute", "(", "any", "(", ")", ")", ";", "}" ]
Test method to verify consumer undergoes the transition WAITING_ON_PARENT_SHARDS -> INITIALIZING -> PROCESSING
[ "Test", "method", "to", "verify", "consumer", "undergoes", "the", "transition", "WAITING_ON_PARENT_SHARDS", "-", ">", "INITIALIZING", "-", ">", "PROCESSING" ]
[ "// Suppress any exception like the scheduler." ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 5847, 7923, 203, 565, 632, 4709, 203, 565, 1071, 727, 918, 1842, 14277, 5869, 1119, 8850, 1435, 1216, 1185, 288, 203, 3639, 27299, 2657, 21005, 273, 21459, 12, 21097, 1179, 1769, 203, 203, 3639, 741, 13203, 12, 5768, 4431, 317, 5122, 5289, 20013, 12, 5768, 4431, 3719, 203, 7734, 263, 13723, 12, 7205, 21005, 2934, 8837, 12, 2273, 10663, 203, 203, 3639, 16490, 5869, 4765, 273, 394, 16490, 5869, 12, 7094, 15960, 16, 2657, 21005, 16, 5820, 966, 16, 203, 7734, 613, 6210, 1290, 2174, 4436, 4814, 16, 5820, 5869, 1379, 16, 14547, 1398, 13733, 1119, 16, 203, 7734, 268, 317, 268, 16, 404, 16, 1562, 3210, 2223, 16, 374, 1769, 203, 203, 3639, 5416, 14277, 984, 2629, 1398, 13733, 5621, 203, 3639, 5416, 14277, 7520, 1190, 5247, 8850, 5621, 203, 3639, 5416, 14277, 7798, 12, 2011, 1769, 203, 203, 3639, 509, 11078, 3210, 1380, 273, 890, 31, 203, 3639, 741, 288, 203, 5411, 775, 288, 203, 7734, 4765, 18, 8837, 9977, 5621, 203, 5411, 289, 1044, 261, 503, 425, 13, 288, 203, 7734, 368, 4598, 1281, 1520, 3007, 326, 8129, 18, 203, 7734, 2321, 2932, 7762, 1520, 1323, 11274, 4765, 6596, 8863, 203, 5411, 289, 203, 3639, 289, 1323, 261, 413, 297, 3682, 3345, 3210, 1380, 405, 374, 1769, 203, 203, 3639, 1815, 8867, 12, 8428, 5869, 1119, 18, 16560, 1360, 18, 13230, 1119, 7675, 2019, 9334, 4765, 18, 2972, 1119, 7675, 2019, 10663, 203, 3639, 3929, 12, 7205, 21005, 16, 4124, 12, 22, 13, 2934, 8837, 12, 2273, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 707, 358, 3929, 4765, 3613, 3240, 281, 326, 6007, 26859, 1360, 67, 673, 67, 14943, 67, 2664, 985, 3948, 317, 12584, 15154, 1360, 317, 20647, 1360, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
46677fb9375b14645c8be2e5b17af1e6cbd4f30e
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/lifecycle/ShardConsumerTest.java
[ "Apache-2.0" ]
Java
testConsumerNotTransitionsToProcessingWhenInitializationFails
null
@SuppressWarnings("unchecked") @Test public final void testConsumerNotTransitionsToProcessingWhenInitializationFails() { ExecutorService failingService = spy(executorService); ShardConsumer consumer = new ShardConsumer(recordsPublisher, failingService, shardInfo, logWarningForTaskAfterMillis, shardConsumerArgument, blockedOnParentsState, t -> t, 1, taskExecutionListener, 0); mockSuccessfulUnblockOnParents(); mockSuccessfulInitializeWithFailureTransition(); mockSuccessfulProcessing(null); // Failing the initialization task and all other attempts after that. doAnswer(invocation -> directlyExecuteRunnable(invocation)) .doThrow(new RejectedExecutionException()) .when(failingService).execute(any()); int arbitraryExecutionCount = 5; do { try { consumer.executeLifecycle(); } catch (Exception e) { // Suppress any exception like the scheduler. fail("Unexpected exception while executing consumer lifecycle"); } } while (--arbitraryExecutionCount > 0); assertEquals(ShardConsumerState.INITIALIZING.consumerState().state(), consumer.currentState().state()); verify(failingService, times(5)).execute(any()); }
/** * Test method to verify consumer does not transition to PROCESSING from WAITING_ON_PARENT_SHARDS when * INITIALIZING tasks gets rejected. */
Test method to verify consumer does not transition to PROCESSING from WAITING_ON_PARENT_SHARDS when INITIALIZING tasks gets rejected.
[ "Test", "method", "to", "verify", "consumer", "does", "not", "transition", "to", "PROCESSING", "from", "WAITING_ON_PARENT_SHARDS", "when", "INITIALIZING", "tasks", "gets", "rejected", "." ]
@SuppressWarnings("unchecked") @Test public final void testConsumerNotTransitionsToProcessingWhenInitializationFails() { ExecutorService failingService = spy(executorService); ShardConsumer consumer = new ShardConsumer(recordsPublisher, failingService, shardInfo, logWarningForTaskAfterMillis, shardConsumerArgument, blockedOnParentsState, t -> t, 1, taskExecutionListener, 0); mockSuccessfulUnblockOnParents(); mockSuccessfulInitializeWithFailureTransition(); mockSuccessfulProcessing(null); doAnswer(invocation -> directlyExecuteRunnable(invocation)) .doThrow(new RejectedExecutionException()) .when(failingService).execute(any()); int arbitraryExecutionCount = 5; do { try { consumer.executeLifecycle(); } catch (Exception e) { fail("Unexpected exception while executing consumer lifecycle"); } } while (--arbitraryExecutionCount > 0); assertEquals(ShardConsumerState.INITIALIZING.consumerState().state(), consumer.currentState().state()); verify(failingService, times(5)).execute(any()); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Test", "public", "final", "void", "testConsumerNotTransitionsToProcessingWhenInitializationFails", "(", ")", "{", "ExecutorService", "failingService", "=", "spy", "(", "executorService", ")", ";", "ShardConsumer", "consumer", "=", "new", "ShardConsumer", "(", "recordsPublisher", ",", "failingService", ",", "shardInfo", ",", "logWarningForTaskAfterMillis", ",", "shardConsumerArgument", ",", "blockedOnParentsState", ",", "t", "->", "t", ",", "1", ",", "taskExecutionListener", ",", "0", ")", ";", "mockSuccessfulUnblockOnParents", "(", ")", ";", "mockSuccessfulInitializeWithFailureTransition", "(", ")", ";", "mockSuccessfulProcessing", "(", "null", ")", ";", "doAnswer", "(", "invocation", "->", "directlyExecuteRunnable", "(", "invocation", ")", ")", ".", "doThrow", "(", "new", "RejectedExecutionException", "(", ")", ")", ".", "when", "(", "failingService", ")", ".", "execute", "(", "any", "(", ")", ")", ";", "int", "arbitraryExecutionCount", "=", "5", ";", "do", "{", "try", "{", "consumer", ".", "executeLifecycle", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "fail", "(", "\"Unexpected exception while executing consumer lifecycle\"", ")", ";", "}", "}", "while", "(", "--", "arbitraryExecutionCount", ">", "0", ")", ";", "assertEquals", "(", "ShardConsumerState", ".", "INITIALIZING", ".", "consumerState", "(", ")", ".", "state", "(", ")", ",", "consumer", ".", "currentState", "(", ")", ".", "state", "(", ")", ")", ";", "verify", "(", "failingService", ",", "times", "(", "5", ")", ")", ".", "execute", "(", "any", "(", ")", ")", ";", "}" ]
Test method to verify consumer does not transition to PROCESSING from WAITING_ON_PARENT_SHARDS when INITIALIZING tasks gets rejected.
[ "Test", "method", "to", "verify", "consumer", "does", "not", "transition", "to", "PROCESSING", "from", "WAITING_ON_PARENT_SHARDS", "when", "INITIALIZING", "tasks", "gets", "rejected", "." ]
[ "// Failing the initialization task and all other attempts after that.", "// Suppress any exception like the scheduler." ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 5847, 7923, 203, 565, 632, 4709, 203, 565, 1071, 727, 918, 1842, 5869, 1248, 23299, 774, 7798, 9434, 17701, 30800, 1435, 288, 203, 3639, 27299, 21311, 1179, 273, 21459, 12, 21097, 1179, 1769, 203, 3639, 16490, 5869, 4765, 273, 394, 16490, 5869, 12, 7094, 15960, 16, 21311, 1179, 16, 5820, 966, 16, 203, 7734, 613, 6210, 1290, 2174, 4436, 4814, 16, 5820, 5869, 1379, 16, 14547, 1398, 13733, 1119, 16, 203, 7734, 268, 317, 268, 16, 404, 16, 1562, 3210, 2223, 16, 374, 1769, 203, 203, 3639, 5416, 14277, 984, 2629, 1398, 13733, 5621, 203, 3639, 5416, 14277, 7520, 1190, 5247, 8850, 5621, 203, 3639, 5416, 14277, 7798, 12, 2011, 1769, 203, 203, 3639, 368, 8911, 310, 326, 10313, 1562, 471, 777, 1308, 7531, 1839, 716, 18, 203, 3639, 741, 13203, 12, 5768, 4431, 317, 5122, 5289, 20013, 12, 5768, 4431, 3719, 203, 7734, 263, 2896, 8282, 12, 2704, 868, 6059, 14576, 10756, 203, 7734, 263, 13723, 12, 507, 4973, 1179, 2934, 8837, 12, 2273, 10663, 203, 203, 3639, 509, 11078, 3210, 1380, 273, 1381, 31, 203, 3639, 741, 288, 203, 5411, 775, 288, 203, 7734, 4765, 18, 8837, 9977, 5621, 203, 5411, 289, 1044, 261, 503, 425, 13, 288, 203, 7734, 368, 4598, 1281, 1520, 3007, 326, 8129, 18, 203, 7734, 2321, 2932, 7762, 1520, 1323, 11274, 4765, 6596, 8863, 203, 5411, 289, 203, 3639, 289, 1323, 261, 413, 297, 3682, 3345, 3210, 1380, 405, 374, 1769, 203, 203, 3639, 1815, 8867, 12, 8428, 5869, 1119, 18, 12919, 15154, 1360, 18, 13230, 1119, 7675, 2019, 9334, 4765, 18, 2972, 1119, 7675, 2019, 10663, 203, 3639, 3929, 12, 507, 4973, 1179, 16, 4124, 12, 25, 13, 2934, 8837, 12, 2273, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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-100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
46677fb9375b14645c8be2e5b17af1e6cbd4f30e
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/lifecycle/ShardConsumerTest.java
[ "Apache-2.0" ]
Java
testConsumerTransitionsToProcessingWithIntermittentInitializationFailures
null
@SuppressWarnings("unchecked") @Test public final void testConsumerTransitionsToProcessingWithIntermittentInitializationFailures() { ExecutorService failingService = spy(executorService); ShardConsumer consumer = new ShardConsumer(recordsPublisher, failingService, shardInfo, logWarningForTaskAfterMillis, shardConsumerArgument, blockedOnParentsState, t -> t, 1, taskExecutionListener, 0); mockSuccessfulUnblockOnParents(); mockSuccessfulInitializeWithFailureTransition(); mockSuccessfulProcessing(null); // Failing the initialization task and few other attempts after that. doAnswer(invocation -> directlyExecuteRunnable(invocation)) .doThrow(new RejectedExecutionException()) .doThrow(new RejectedExecutionException()) .doThrow(new RejectedExecutionException()) .doAnswer(invocation -> directlyExecuteRunnable(invocation)) .when(failingService).execute(any()); int arbitraryExecutionCount = 6; do { try { consumer.executeLifecycle(); } catch (Exception e) { // Suppress any exception like the scheduler. fail("Unexpected exception while executing consumer lifecycle"); } } while (--arbitraryExecutionCount > 0); assertEquals(ShardConsumerState.PROCESSING.consumerState().state(), consumer.currentState().state()); verify(failingService, times(5)).execute(any()); }
/** * Test method to verify consumer transition to PROCESSING from WAITING_ON_PARENT_SHARDS with * intermittent INITIALIZING task rejections. */
Test method to verify consumer transition to PROCESSING from WAITING_ON_PARENT_SHARDS with intermittent INITIALIZING task rejections.
[ "Test", "method", "to", "verify", "consumer", "transition", "to", "PROCESSING", "from", "WAITING_ON_PARENT_SHARDS", "with", "intermittent", "INITIALIZING", "task", "rejections", "." ]
@SuppressWarnings("unchecked") @Test public final void testConsumerTransitionsToProcessingWithIntermittentInitializationFailures() { ExecutorService failingService = spy(executorService); ShardConsumer consumer = new ShardConsumer(recordsPublisher, failingService, shardInfo, logWarningForTaskAfterMillis, shardConsumerArgument, blockedOnParentsState, t -> t, 1, taskExecutionListener, 0); mockSuccessfulUnblockOnParents(); mockSuccessfulInitializeWithFailureTransition(); mockSuccessfulProcessing(null); doAnswer(invocation -> directlyExecuteRunnable(invocation)) .doThrow(new RejectedExecutionException()) .doThrow(new RejectedExecutionException()) .doThrow(new RejectedExecutionException()) .doAnswer(invocation -> directlyExecuteRunnable(invocation)) .when(failingService).execute(any()); int arbitraryExecutionCount = 6; do { try { consumer.executeLifecycle(); } catch (Exception e) { fail("Unexpected exception while executing consumer lifecycle"); } } while (--arbitraryExecutionCount > 0); assertEquals(ShardConsumerState.PROCESSING.consumerState().state(), consumer.currentState().state()); verify(failingService, times(5)).execute(any()); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Test", "public", "final", "void", "testConsumerTransitionsToProcessingWithIntermittentInitializationFailures", "(", ")", "{", "ExecutorService", "failingService", "=", "spy", "(", "executorService", ")", ";", "ShardConsumer", "consumer", "=", "new", "ShardConsumer", "(", "recordsPublisher", ",", "failingService", ",", "shardInfo", ",", "logWarningForTaskAfterMillis", ",", "shardConsumerArgument", ",", "blockedOnParentsState", ",", "t", "->", "t", ",", "1", ",", "taskExecutionListener", ",", "0", ")", ";", "mockSuccessfulUnblockOnParents", "(", ")", ";", "mockSuccessfulInitializeWithFailureTransition", "(", ")", ";", "mockSuccessfulProcessing", "(", "null", ")", ";", "doAnswer", "(", "invocation", "->", "directlyExecuteRunnable", "(", "invocation", ")", ")", ".", "doThrow", "(", "new", "RejectedExecutionException", "(", ")", ")", ".", "doThrow", "(", "new", "RejectedExecutionException", "(", ")", ")", ".", "doThrow", "(", "new", "RejectedExecutionException", "(", ")", ")", ".", "doAnswer", "(", "invocation", "->", "directlyExecuteRunnable", "(", "invocation", ")", ")", ".", "when", "(", "failingService", ")", ".", "execute", "(", "any", "(", ")", ")", ";", "int", "arbitraryExecutionCount", "=", "6", ";", "do", "{", "try", "{", "consumer", ".", "executeLifecycle", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "fail", "(", "\"Unexpected exception while executing consumer lifecycle\"", ")", ";", "}", "}", "while", "(", "--", "arbitraryExecutionCount", ">", "0", ")", ";", "assertEquals", "(", "ShardConsumerState", ".", "PROCESSING", ".", "consumerState", "(", ")", ".", "state", "(", ")", ",", "consumer", ".", "currentState", "(", ")", ".", "state", "(", ")", ")", ";", "verify", "(", "failingService", ",", "times", "(", "5", ")", ")", ".", "execute", "(", "any", "(", ")", ")", ";", "}" ]
Test method to verify consumer transition to PROCESSING from WAITING_ON_PARENT_SHARDS with intermittent INITIALIZING task rejections.
[ "Test", "method", "to", "verify", "consumer", "transition", "to", "PROCESSING", "from", "WAITING_ON_PARENT_SHARDS", "with", "intermittent", "INITIALIZING", "task", "rejections", "." ]
[ "// Failing the initialization task and few other attempts after that.", "// Suppress any exception like the scheduler." ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 5847, 7923, 203, 565, 632, 4709, 203, 565, 1071, 727, 918, 1842, 5869, 23299, 774, 7798, 1190, 2465, 1938, 88, 319, 17701, 14479, 1435, 288, 203, 3639, 27299, 21311, 1179, 273, 21459, 12, 21097, 1179, 1769, 203, 3639, 16490, 5869, 4765, 273, 394, 16490, 5869, 12, 7094, 15960, 16, 21311, 1179, 16, 5820, 966, 16, 203, 7734, 613, 6210, 1290, 2174, 4436, 4814, 16, 5820, 5869, 1379, 16, 14547, 1398, 13733, 1119, 16, 203, 7734, 268, 317, 268, 16, 404, 16, 1562, 3210, 2223, 16, 374, 1769, 203, 203, 3639, 5416, 14277, 984, 2629, 1398, 13733, 5621, 203, 3639, 5416, 14277, 7520, 1190, 5247, 8850, 5621, 203, 3639, 5416, 14277, 7798, 12, 2011, 1769, 203, 203, 3639, 368, 8911, 310, 326, 10313, 1562, 471, 11315, 1308, 7531, 1839, 716, 18, 203, 3639, 741, 13203, 12, 5768, 4431, 317, 5122, 5289, 20013, 12, 5768, 4431, 3719, 203, 7734, 263, 2896, 8282, 12, 2704, 868, 6059, 14576, 10756, 203, 7734, 263, 2896, 8282, 12, 2704, 868, 6059, 14576, 10756, 203, 7734, 263, 2896, 8282, 12, 2704, 868, 6059, 14576, 10756, 203, 7734, 263, 2896, 13203, 12, 5768, 4431, 317, 5122, 5289, 20013, 12, 5768, 4431, 3719, 203, 7734, 263, 13723, 12, 507, 4973, 1179, 2934, 8837, 12, 2273, 10663, 203, 203, 3639, 509, 11078, 3210, 1380, 273, 1666, 31, 203, 3639, 741, 288, 203, 5411, 775, 288, 203, 7734, 4765, 18, 8837, 9977, 5621, 203, 5411, 289, 1044, 261, 503, 425, 13, 288, 203, 7734, 368, 4598, 1281, 1520, 3007, 326, 8129, 18, 203, 7734, 2321, 2932, 7762, 1520, 1323, 11274, 4765, 6596, 8863, 203, 5411, 289, 203, 3639, 289, 1323, 261, 413, 297, 3682, 3345, 3210, 1380, 405, 374, 1769, 203, 203, 3639, 1815, 8867, 12, 8428, 5869, 1119, 18, 16560, 1360, 18, 13230, 1119, 7675, 2019, 9334, 4765, 18, 2972, 1119, 7675, 2019, 10663, 203, 3639, 3929, 12, 507, 4973, 1179, 16, 4124, 12, 25, 13, 2934, 8837, 12, 2273, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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1938, 88, 319, 12584, 15154, 1360, 1562, 283, 3710, 87, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
46677fb9375b14645c8be2e5b17af1e6cbd4f30e
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/lifecycle/ShardConsumerTest.java
[ "Apache-2.0" ]
Java
testConsumerNotTransitionsToInitializingWhenWaitingOnParentsFails
null
@SuppressWarnings("unchecked") @Test public final void testConsumerNotTransitionsToInitializingWhenWaitingOnParentsFails() { ExecutorService failingService = spy(executorService); ShardConsumer consumer = new ShardConsumer(recordsPublisher, failingService, shardInfo, logWarningForTaskAfterMillis, shardConsumerArgument, blockedOnParentsState, t -> t, 1, taskExecutionListener, 0); mockSuccessfulUnblockOnParentsWithFailureTransition(); mockSuccessfulInitializeWithFailureTransition(); // Failing the waiting_on_parents task and few other attempts after that. doThrow(new RejectedExecutionException()) .when(failingService).execute(any()); int arbitraryExecutionCount = 5; do { try { consumer.executeLifecycle(); } catch (Exception e) { // Suppress any exception like the scheduler. fail("Unexpected exception while executing consumer lifecycle"); } } while (--arbitraryExecutionCount > 0); assertEquals(ShardConsumerState.WAITING_ON_PARENT_SHARDS.consumerState().state(), consumer.currentState().state()); verify(failingService, times(5)).execute(any()); }
/** * Test method to verify consumer does not transition to INITIALIZING when WAITING_ON_PARENT_SHARDS task rejected. */
Test method to verify consumer does not transition to INITIALIZING when WAITING_ON_PARENT_SHARDS task rejected.
[ "Test", "method", "to", "verify", "consumer", "does", "not", "transition", "to", "INITIALIZING", "when", "WAITING_ON_PARENT_SHARDS", "task", "rejected", "." ]
@SuppressWarnings("unchecked") @Test public final void testConsumerNotTransitionsToInitializingWhenWaitingOnParentsFails() { ExecutorService failingService = spy(executorService); ShardConsumer consumer = new ShardConsumer(recordsPublisher, failingService, shardInfo, logWarningForTaskAfterMillis, shardConsumerArgument, blockedOnParentsState, t -> t, 1, taskExecutionListener, 0); mockSuccessfulUnblockOnParentsWithFailureTransition(); mockSuccessfulInitializeWithFailureTransition(); doThrow(new RejectedExecutionException()) .when(failingService).execute(any()); int arbitraryExecutionCount = 5; do { try { consumer.executeLifecycle(); } catch (Exception e) { fail("Unexpected exception while executing consumer lifecycle"); } } while (--arbitraryExecutionCount > 0); assertEquals(ShardConsumerState.WAITING_ON_PARENT_SHARDS.consumerState().state(), consumer.currentState().state()); verify(failingService, times(5)).execute(any()); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Test", "public", "final", "void", "testConsumerNotTransitionsToInitializingWhenWaitingOnParentsFails", "(", ")", "{", "ExecutorService", "failingService", "=", "spy", "(", "executorService", ")", ";", "ShardConsumer", "consumer", "=", "new", "ShardConsumer", "(", "recordsPublisher", ",", "failingService", ",", "shardInfo", ",", "logWarningForTaskAfterMillis", ",", "shardConsumerArgument", ",", "blockedOnParentsState", ",", "t", "->", "t", ",", "1", ",", "taskExecutionListener", ",", "0", ")", ";", "mockSuccessfulUnblockOnParentsWithFailureTransition", "(", ")", ";", "mockSuccessfulInitializeWithFailureTransition", "(", ")", ";", "doThrow", "(", "new", "RejectedExecutionException", "(", ")", ")", ".", "when", "(", "failingService", ")", ".", "execute", "(", "any", "(", ")", ")", ";", "int", "arbitraryExecutionCount", "=", "5", ";", "do", "{", "try", "{", "consumer", ".", "executeLifecycle", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "fail", "(", "\"Unexpected exception while executing consumer lifecycle\"", ")", ";", "}", "}", "while", "(", "--", "arbitraryExecutionCount", ">", "0", ")", ";", "assertEquals", "(", "ShardConsumerState", ".", "WAITING_ON_PARENT_SHARDS", ".", "consumerState", "(", ")", ".", "state", "(", ")", ",", "consumer", ".", "currentState", "(", ")", ".", "state", "(", ")", ")", ";", "verify", "(", "failingService", ",", "times", "(", "5", ")", ")", ".", "execute", "(", "any", "(", ")", ")", ";", "}" ]
Test method to verify consumer does not transition to INITIALIZING when WAITING_ON_PARENT_SHARDS task rejected.
[ "Test", "method", "to", "verify", "consumer", "does", "not", "transition", "to", "INITIALIZING", "when", "WAITING_ON_PARENT_SHARDS", "task", "rejected", "." ]
[ "// Failing the waiting_on_parents task and few other attempts after that.", "// Suppress any exception like the scheduler." ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 5847, 7923, 203, 565, 632, 4709, 203, 565, 1071, 727, 918, 1842, 5869, 1248, 23299, 774, 29782, 9434, 15946, 1398, 13733, 30800, 1435, 288, 203, 3639, 27299, 21311, 1179, 273, 21459, 12, 21097, 1179, 1769, 203, 3639, 16490, 5869, 4765, 273, 394, 16490, 5869, 12, 7094, 15960, 16, 21311, 1179, 16, 5820, 966, 16, 203, 7734, 613, 6210, 1290, 2174, 4436, 4814, 16, 5820, 5869, 1379, 16, 14547, 1398, 13733, 1119, 16, 203, 7734, 268, 317, 268, 16, 404, 16, 1562, 3210, 2223, 16, 374, 1769, 203, 203, 3639, 5416, 14277, 984, 2629, 1398, 13733, 1190, 5247, 8850, 5621, 203, 3639, 5416, 14277, 7520, 1190, 5247, 8850, 5621, 203, 203, 3639, 368, 8911, 310, 326, 7336, 67, 265, 67, 12606, 1562, 471, 11315, 1308, 7531, 1839, 716, 18, 203, 3639, 741, 8282, 12, 2704, 868, 6059, 14576, 10756, 203, 7734, 263, 13723, 12, 507, 4973, 1179, 2934, 8837, 12, 2273, 10663, 203, 203, 3639, 509, 11078, 3210, 1380, 273, 1381, 31, 203, 3639, 741, 288, 203, 5411, 775, 288, 203, 7734, 4765, 18, 8837, 9977, 5621, 203, 5411, 289, 1044, 261, 503, 425, 13, 288, 203, 7734, 368, 4598, 1281, 1520, 3007, 326, 8129, 18, 203, 7734, 2321, 2932, 7762, 1520, 1323, 11274, 4765, 6596, 8863, 203, 5411, 289, 203, 3639, 289, 1323, 261, 413, 297, 3682, 3345, 3210, 1380, 405, 374, 1769, 203, 203, 3639, 1815, 8867, 12, 8428, 5869, 1119, 18, 19046, 1360, 67, 673, 67, 14943, 67, 2664, 985, 3948, 18, 13230, 1119, 7675, 2019, 9334, 4765, 18, 2972, 1119, 7675, 2019, 10663, 203, 3639, 3929, 12, 507, 4973, 1179, 16, 4124, 12, 25, 13, 2934, 8837, 12, 2273, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 707, 358, 3929, 4765, 1552, 486, 6007, 358, 12584, 15154, 1360, 1347, 26859, 1360, 67, 673, 67, 14943, 67, 2664, 985, 3948, 1562, 11876, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
46677fb9375b14645c8be2e5b17af1e6cbd4f30e
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/lifecycle/ShardConsumerTest.java
[ "Apache-2.0" ]
Java
testInitializationStateUponSubmissionFailure
null
@SuppressWarnings("unchecked") @Test(expected = RejectedExecutionException.class) public final void testInitializationStateUponSubmissionFailure() throws Exception { ExecutorService failingService = mock(ExecutorService.class); ShardConsumer consumer = new ShardConsumer(recordsPublisher, failingService, shardInfo, logWarningForTaskAfterMillis, shardConsumerArgument, initialState, t -> t, 1, taskExecutionListener, 0); doThrow(new RejectedExecutionException()).when(failingService).execute(any()); boolean initComplete; do { initComplete = consumer.initializeComplete().get(); } while (!initComplete); verifyZeroInteractions(taskExecutionListener); }
/** * Test method to verify consumer stays in INITIALIZING state when InitializationTask fails. */
Test method to verify consumer stays in INITIALIZING state when InitializationTask fails.
[ "Test", "method", "to", "verify", "consumer", "stays", "in", "INITIALIZING", "state", "when", "InitializationTask", "fails", "." ]
@SuppressWarnings("unchecked") @Test(expected = RejectedExecutionException.class) public final void testInitializationStateUponSubmissionFailure() throws Exception { ExecutorService failingService = mock(ExecutorService.class); ShardConsumer consumer = new ShardConsumer(recordsPublisher, failingService, shardInfo, logWarningForTaskAfterMillis, shardConsumerArgument, initialState, t -> t, 1, taskExecutionListener, 0); doThrow(new RejectedExecutionException()).when(failingService).execute(any()); boolean initComplete; do { initComplete = consumer.initializeComplete().get(); } while (!initComplete); verifyZeroInteractions(taskExecutionListener); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Test", "(", "expected", "=", "RejectedExecutionException", ".", "class", ")", "public", "final", "void", "testInitializationStateUponSubmissionFailure", "(", ")", "throws", "Exception", "{", "ExecutorService", "failingService", "=", "mock", "(", "ExecutorService", ".", "class", ")", ";", "ShardConsumer", "consumer", "=", "new", "ShardConsumer", "(", "recordsPublisher", ",", "failingService", ",", "shardInfo", ",", "logWarningForTaskAfterMillis", ",", "shardConsumerArgument", ",", "initialState", ",", "t", "->", "t", ",", "1", ",", "taskExecutionListener", ",", "0", ")", ";", "doThrow", "(", "new", "RejectedExecutionException", "(", ")", ")", ".", "when", "(", "failingService", ")", ".", "execute", "(", "any", "(", ")", ")", ";", "boolean", "initComplete", ";", "do", "{", "initComplete", "=", "consumer", ".", "initializeComplete", "(", ")", ".", "get", "(", ")", ";", "}", "while", "(", "!", "initComplete", ")", ";", "verifyZeroInteractions", "(", "taskExecutionListener", ")", ";", "}" ]
Test method to verify consumer stays in INITIALIZING state when InitializationTask fails.
[ "Test", "method", "to", "verify", "consumer", "stays", "in", "INITIALIZING", "state", "when", "InitializationTask", "fails", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 5847, 7923, 203, 565, 632, 4709, 12, 3825, 273, 868, 6059, 14576, 18, 1106, 13, 203, 565, 1071, 727, 918, 1842, 17701, 1119, 57, 500, 17865, 5247, 1435, 1216, 1185, 288, 203, 203, 3639, 27299, 21311, 1179, 273, 5416, 12, 21005, 18, 1106, 1769, 203, 3639, 16490, 5869, 4765, 273, 394, 16490, 5869, 12, 7094, 15960, 16, 21311, 1179, 16, 5820, 966, 16, 203, 7734, 613, 6210, 1290, 2174, 4436, 4814, 16, 5820, 5869, 1379, 16, 2172, 1119, 16, 268, 317, 268, 16, 404, 16, 1562, 3210, 2223, 16, 374, 1769, 203, 203, 3639, 741, 8282, 12, 2704, 868, 6059, 14576, 1435, 2934, 13723, 12, 507, 4973, 1179, 2934, 8837, 12, 2273, 10663, 203, 203, 3639, 1250, 1208, 6322, 31, 203, 3639, 741, 288, 203, 5411, 1208, 6322, 273, 4765, 18, 11160, 6322, 7675, 588, 5621, 203, 3639, 289, 1323, 16051, 2738, 6322, 1769, 203, 3639, 3929, 7170, 2465, 4905, 12, 4146, 3210, 2223, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 707, 358, 3929, 4765, 384, 8271, 316, 12584, 15154, 1360, 919, 1347, 26586, 2174, 6684, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
ee2504d8cfb1147e073ad7780a4bf44e26ffe817
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/leases/ShardObjectHelper.java
[ "Apache-2.0" ]
Java
newShard
Shard
static Shard newShard(String shardId, String parentShardId, String adjacentParentShardId, SequenceNumberRange sequenceNumberRange) { return newShard(shardId, parentShardId, adjacentParentShardId, sequenceNumberRange, HashKeyRange.builder().startingHashKey("1").endingHashKey("100").build()); }
/** Helper method to create a new shard object. * @param shardId * @param parentShardId * @param adjacentParentShardId * @param sequenceNumberRange * @return */
Helper method to create a new shard object.
[ "Helper", "method", "to", "create", "a", "new", "shard", "object", "." ]
static Shard newShard(String shardId, String parentShardId, String adjacentParentShardId, SequenceNumberRange sequenceNumberRange) { return newShard(shardId, parentShardId, adjacentParentShardId, sequenceNumberRange, HashKeyRange.builder().startingHashKey("1").endingHashKey("100").build()); }
[ "static", "Shard", "newShard", "(", "String", "shardId", ",", "String", "parentShardId", ",", "String", "adjacentParentShardId", ",", "SequenceNumberRange", "sequenceNumberRange", ")", "{", "return", "newShard", "(", "shardId", ",", "parentShardId", ",", "adjacentParentShardId", ",", "sequenceNumberRange", ",", "HashKeyRange", ".", "builder", "(", ")", ".", "startingHashKey", "(", "\"1\"", ")", ".", "endingHashKey", "(", "\"100\"", ")", ".", "build", "(", ")", ")", ";", "}" ]
Helper method to create a new shard object.
[ "Helper", "method", "to", "create", "a", "new", "shard", "object", "." ]
[]
[ { "param": "shardId", "type": "String" }, { "param": "parentShardId", "type": "String" }, { "param": "adjacentParentShardId", "type": "String" }, { "param": "sequenceNumberRange", "type": "SequenceNumberRange" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "shardId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "parentShardId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "adjacentParentShardId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sequenceNumberRange", "type": "SequenceNumberRange", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 760, 16490, 394, 8428, 12, 780, 5820, 548, 16, 203, 5411, 514, 982, 8428, 548, 16, 203, 5411, 514, 16335, 3054, 8428, 548, 16, 203, 5411, 8370, 1854, 2655, 3102, 1854, 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 982, 8428, 548, 203, 377, 380, 632, 891, 16335, 3054, 8428, 548, 203, 377, 380, 632, 891, 3102, 1854, 2655, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
ee2504d8cfb1147e073ad7780a4bf44e26ffe817
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/leases/ShardObjectHelper.java
[ "Apache-2.0" ]
Java
newShard
Shard
public static Shard newShard(String shardId, String parentShardId, String adjacentParentShardId, SequenceNumberRange sequenceNumberRange, HashKeyRange hashKeyRange) { return Shard.builder().shardId(shardId).parentShardId(parentShardId).adjacentParentShardId(adjacentParentShardId).sequenceNumberRange(sequenceNumberRange).hashKeyRange(hashKeyRange).build(); }
/** Helper method to create a new shard object. * @param shardId * @param parentShardId * @param adjacentParentShardId * @param sequenceNumberRange * @param hashKeyRange * @return */
Helper method to create a new shard object.
[ "Helper", "method", "to", "create", "a", "new", "shard", "object", "." ]
public static Shard newShard(String shardId, String parentShardId, String adjacentParentShardId, SequenceNumberRange sequenceNumberRange, HashKeyRange hashKeyRange) { return Shard.builder().shardId(shardId).parentShardId(parentShardId).adjacentParentShardId(adjacentParentShardId).sequenceNumberRange(sequenceNumberRange).hashKeyRange(hashKeyRange).build(); }
[ "public", "static", "Shard", "newShard", "(", "String", "shardId", ",", "String", "parentShardId", ",", "String", "adjacentParentShardId", ",", "SequenceNumberRange", "sequenceNumberRange", ",", "HashKeyRange", "hashKeyRange", ")", "{", "return", "Shard", ".", "builder", "(", ")", ".", "shardId", "(", "shardId", ")", ".", "parentShardId", "(", "parentShardId", ")", ".", "adjacentParentShardId", "(", "adjacentParentShardId", ")", ".", "sequenceNumberRange", "(", "sequenceNumberRange", ")", ".", "hashKeyRange", "(", "hashKeyRange", ")", ".", "build", "(", ")", ";", "}" ]
Helper method to create a new shard object.
[ "Helper", "method", "to", "create", "a", "new", "shard", "object", "." ]
[]
[ { "param": "shardId", "type": "String" }, { "param": "parentShardId", "type": "String" }, { "param": "adjacentParentShardId", "type": "String" }, { "param": "sequenceNumberRange", "type": "SequenceNumberRange" }, { "param": "hashKeyRange", "type": "HashKeyRange" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "shardId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "parentShardId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "adjacentParentShardId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sequenceNumberRange", "type": "SequenceNumberRange", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "hashKeyRange", "type": "HashKeyRange", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 16490, 394, 8428, 12, 780, 5820, 548, 16, 203, 4766, 514, 982, 8428, 548, 16, 203, 4766, 514, 16335, 3054, 8428, 548, 16, 203, 4766, 8370, 1854, 2655, 3102, 1854, 2655, 16, 203, 4766, 2474, 653, 2655, 29623, 2655, 13, 288, 203, 3639, 327, 16490, 18, 9574, 7675, 22630, 548, 12, 22630, 548, 2934, 2938, 8428, 548, 12, 2938, 8428, 548, 2934, 13829, 25897, 3054, 8428, 548, 12, 13829, 25897, 3054, 8428, 548, 2934, 6178, 1854, 2655, 12, 6178, 1854, 2655, 2934, 2816, 653, 2655, 12, 2816, 653, 2655, 2934, 3510, 5621, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 9705, 707, 358, 752, 279, 394, 5820, 733, 18, 203, 377, 380, 632, 891, 5820, 548, 203, 377, 380, 632, 891, 982, 8428, 548, 203, 377, 380, 632, 891, 16335, 3054, 8428, 548, 203, 377, 380, 632, 891, 3102, 1854, 2655, 203, 377, 380, 632, 891, 29623, 2655, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testCheckpoint
null
@Test public final void testCheckpoint() throws Exception { // First call to checkpoint ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.largestPermittedCheckpointValue(startingExtendedSequenceNumber); processingCheckpointer.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(startingExtendedSequenceNumber)); // Advance checkpoint ExtendedSequenceNumber sequenceNumber = new ExtendedSequenceNumber("5019"); processingCheckpointer.largestPermittedCheckpointValue(sequenceNumber); processingCheckpointer.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(sequenceNumber)); }
/** * Test method for * {@link ShardRecordProcessorCheckpointer#checkpoint()}. */
Test method for ShardRecordProcessorCheckpointer#checkpoint().
[ "Test", "method", "for", "ShardRecordProcessorCheckpointer#checkpoint", "()", "." ]
@Test public final void testCheckpoint() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.largestPermittedCheckpointValue(startingExtendedSequenceNumber); processingCheckpointer.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(startingExtendedSequenceNumber)); ExtendedSequenceNumber sequenceNumber = new ExtendedSequenceNumber("5019"); processingCheckpointer.largestPermittedCheckpointValue(sequenceNumber); processingCheckpointer.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(sequenceNumber)); }
[ "@", "Test", "public", "final", "void", "testCheckpoint", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "startingExtendedSequenceNumber", ")", ")", ";", "ExtendedSequenceNumber", "sequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"5019\"", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "sequenceNumber", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "sequenceNumber", ")", ")", ";", "}" ]
Test method for {@link ShardRecordProcessorCheckpointer#checkpoint()}.
[ "Test", "method", "for", "{", "@link", "ShardRecordProcessorCheckpointer#checkpoint", "()", "}", "." ]
[ "// First call to checkpoint", "// Advance checkpoint" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 14431, 1435, 1216, 1185, 288, 203, 3639, 368, 5783, 745, 358, 9776, 203, 3639, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 203, 7734, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 3639, 4929, 1564, 10437, 18, 25414, 5621, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 18526, 11456, 21047, 10019, 203, 203, 3639, 368, 4052, 5882, 9776, 203, 3639, 14094, 21047, 3102, 1854, 273, 394, 14094, 21047, 2932, 9172, 29, 8863, 203, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 6178, 1854, 1769, 203, 3639, 4929, 1564, 10437, 18,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 707, 364, 203, 377, 380, 8901, 1232, 16490, 2115, 5164, 1564, 10437, 7, 25414, 1435, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testCheckpointRecord
null
@Test public final void testCheckpointRecord() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5025"); Record record = makeRecord("5025"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); processingCheckpointer.checkpoint(record); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); }
/** * Test method for * {@link ShardRecordProcessorCheckpointer#checkpoint(Record record)}. */
Test method for ShardRecordProcessorCheckpointer#checkpoint(Record record).
[ "Test", "method", "for", "ShardRecordProcessorCheckpointer#checkpoint", "(", "Record", "record", ")", "." ]
@Test public final void testCheckpointRecord() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5025"); Record record = makeRecord("5025"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); processingCheckpointer.checkpoint(record); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); }
[ "@", "Test", "public", "final", "void", "testCheckpointRecord", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "ExtendedSequenceNumber", "extendedSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"5025\"", ")", ";", "Record", "record", "=", "makeRecord", "(", "\"5025\"", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "extendedSequenceNumber", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", "record", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "}" ]
Test method for {@link ShardRecordProcessorCheckpointer#checkpoint(Record record)}.
[ "Test", "method", "for", "{", "@link", "ShardRecordProcessorCheckpointer#checkpoint", "(", "Record", "record", ")", "}", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 14431, 2115, 1435, 1216, 1185, 288, 203, 377, 202, 8428, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 203, 7734, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 377, 202, 10632, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 377, 202, 11456, 21047, 7021, 21047, 273, 394, 14094, 21047, 2932, 3361, 2947, 8863, 203, 377, 202, 2115, 1409, 273, 1221, 2115, 2932, 3361, 2947, 8863, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 14948, 21047, 1769, 203, 3639, 4929, 1564, 10437, 18, 25414, 12, 3366, 1769, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 14948, 21047, 10019, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 707, 364, 203, 377, 380, 8901, 1232, 16490, 2115, 5164, 1564, 10437, 7, 25414, 12, 2115, 1409, 13, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testCheckpointSubRecord
null
@Test public final void testCheckpointSubRecord() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5030"); Record record = makeRecord("5030"); //UserRecord subRecord = new UserRecord(record); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); processingCheckpointer.checkpoint(record); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); }
/** * Test method for * {@link ShardRecordProcessorCheckpointer#checkpoint(Record record)}. */
Test method for ShardRecordProcessorCheckpointer#checkpoint(Record record).
[ "Test", "method", "for", "ShardRecordProcessorCheckpointer#checkpoint", "(", "Record", "record", ")", "." ]
@Test public final void testCheckpointSubRecord() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5030"); Record record = makeRecord("5030"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); processingCheckpointer.checkpoint(record); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); }
[ "@", "Test", "public", "final", "void", "testCheckpointSubRecord", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "ExtendedSequenceNumber", "extendedSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"5030\"", ")", ";", "Record", "record", "=", "makeRecord", "(", "\"5030\"", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "extendedSequenceNumber", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", "record", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "}" ]
Test method for {@link ShardRecordProcessorCheckpointer#checkpoint(Record record)}.
[ "Test", "method", "for", "{", "@link", "ShardRecordProcessorCheckpointer#checkpoint", "(", "Record", "record", ")", "}", "." ]
[ "//UserRecord subRecord = new UserRecord(record);" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 14431, 1676, 2115, 1435, 1216, 1185, 288, 203, 377, 202, 8428, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 203, 7734, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 377, 202, 10632, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 377, 202, 11456, 21047, 7021, 21047, 273, 394, 14094, 21047, 2932, 3361, 5082, 8863, 203, 377, 202, 2115, 1409, 273, 1221, 2115, 2932, 3361, 5082, 8863, 203, 3639, 368, 1299, 2115, 720, 2115, 273, 394, 2177, 2115, 12, 3366, 1769, 203, 377, 202, 10632, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 14948, 21047, 1769, 203, 3639, 4929, 1564, 10437, 18, 25414, 12, 3366, 1769, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 14948, 21047, 10019, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 707, 364, 203, 377, 380, 8901, 1232, 16490, 2115, 5164, 1564, 10437, 7, 25414, 12, 2115, 1409, 13, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testCheckpointSequenceNumber
null
@Test public final void testCheckpointSequenceNumber() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5035"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); processingCheckpointer.checkpoint("5035"); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); }
/** * Test method for * {@link ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber)}. */
Test method for ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber).
[ "Test", "method", "for", "ShardRecordProcessorCheckpointer#checkpoint", "(", "String", "sequenceNumber", ")", "." ]
@Test public final void testCheckpointSequenceNumber() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5035"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); processingCheckpointer.checkpoint("5035"); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); }
[ "@", "Test", "public", "final", "void", "testCheckpointSequenceNumber", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "ExtendedSequenceNumber", "extendedSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"5035\"", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "extendedSequenceNumber", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", "\"5035\"", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "}" ]
Test method for {@link ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber)}.
[ "Test", "method", "for", "{", "@link", "ShardRecordProcessorCheckpointer#checkpoint", "(", "String", "sequenceNumber", ")", "}", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 14431, 21047, 1435, 1216, 1185, 288, 203, 377, 202, 8428, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 203, 7734, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 377, 202, 10632, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 377, 202, 11456, 21047, 7021, 21047, 273, 394, 14094, 21047, 2932, 3361, 4763, 8863, 203, 377, 202, 10632, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 14948, 21047, 1769, 203, 3639, 4929, 1564, 10437, 18, 25414, 2932, 3361, 4763, 8863, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 14948, 21047, 10019, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 707, 364, 203, 377, 380, 8901, 1232, 16490, 2115, 5164, 1564, 10437, 7, 25414, 12, 780, 3102, 1854, 13, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testCheckpointExtendedSequenceNumber
null
@Test public final void testCheckpointExtendedSequenceNumber() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5040"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); processingCheckpointer.checkpoint("5040", 0); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); }
/** * Test method for * {@link ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber, long subSequenceNumber)}. */
Test method for ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber, long subSequenceNumber).
[ "Test", "method", "for", "ShardRecordProcessorCheckpointer#checkpoint", "(", "String", "sequenceNumber", "long", "subSequenceNumber", ")", "." ]
@Test public final void testCheckpointExtendedSequenceNumber() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5040"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); processingCheckpointer.checkpoint("5040", 0); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); }
[ "@", "Test", "public", "final", "void", "testCheckpointExtendedSequenceNumber", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "ExtendedSequenceNumber", "extendedSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"5040\"", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "extendedSequenceNumber", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", "\"5040\"", ",", "0", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "}" ]
Test method for {@link ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber, long subSequenceNumber)}.
[ "Test", "method", "for", "{", "@link", "ShardRecordProcessorCheckpointer#checkpoint", "(", "String", "sequenceNumber", "long", "subSequenceNumber", ")", "}", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 14431, 11456, 21047, 1435, 1216, 1185, 288, 203, 377, 202, 8428, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 203, 7734, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 377, 202, 10632, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 377, 202, 11456, 21047, 7021, 21047, 273, 394, 14094, 21047, 2932, 25, 3028, 20, 8863, 203, 377, 202, 10632, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 14948, 21047, 1769, 203, 3639, 4929, 1564, 10437, 18, 25414, 2932, 25, 3028, 20, 3113, 374, 1769, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 14948, 21047, 10019, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 12, 780, 3102, 1854, 16, 1525, 720, 21047, 13, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testPrepareCheckpoint
null
@Test public final void testPrepareCheckpoint() throws Exception { // First call to checkpoint ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber sequenceNumber1 = new ExtendedSequenceNumber("5001"); processingCheckpointer.largestPermittedCheckpointValue(sequenceNumber1); PreparedCheckpointer preparedCheckpoint = processingCheckpointer.prepareCheckpoint(); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(sequenceNumber1)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sequenceNumber1)); // Advance checkpoint ExtendedSequenceNumber sequenceNumber2 = new ExtendedSequenceNumber("5019"); processingCheckpointer.largestPermittedCheckpointValue(sequenceNumber2); preparedCheckpoint = processingCheckpointer.prepareCheckpoint(); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(sequenceNumber2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sequenceNumber2)); // Checkpoint using preparedCheckpoint preparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(sequenceNumber2)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(sequenceNumber2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
/** * Test method for * {@link ShardRecordProcessorCheckpointer#prepareCheckpoint()}. */
Test method for ShardRecordProcessorCheckpointer#prepareCheckpoint().
[ "Test", "method", "for", "ShardRecordProcessorCheckpointer#prepareCheckpoint", "()", "." ]
@Test public final void testPrepareCheckpoint() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber sequenceNumber1 = new ExtendedSequenceNumber("5001"); processingCheckpointer.largestPermittedCheckpointValue(sequenceNumber1); PreparedCheckpointer preparedCheckpoint = processingCheckpointer.prepareCheckpoint(); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(sequenceNumber1)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sequenceNumber1)); ExtendedSequenceNumber sequenceNumber2 = new ExtendedSequenceNumber("5019"); processingCheckpointer.largestPermittedCheckpointValue(sequenceNumber2); preparedCheckpoint = processingCheckpointer.prepareCheckpoint(); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(sequenceNumber2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sequenceNumber2)); preparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(sequenceNumber2)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(sequenceNumber2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
[ "@", "Test", "public", "final", "void", "testPrepareCheckpoint", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "ExtendedSequenceNumber", "sequenceNumber1", "=", "new", "ExtendedSequenceNumber", "(", "\"5001\"", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "sequenceNumber1", ")", ";", "PreparedCheckpointer", "preparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", ")", ";", "assertThat", "(", "preparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sequenceNumber1", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sequenceNumber1", ")", ")", ";", "ExtendedSequenceNumber", "sequenceNumber2", "=", "new", "ExtendedSequenceNumber", "(", "\"5019\"", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "sequenceNumber2", ")", ";", "preparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", ")", ";", "assertThat", "(", "preparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sequenceNumber2", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sequenceNumber2", ")", ")", ";", "preparedCheckpoint", ".", "checkpoint", "(", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "sequenceNumber2", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "sequenceNumber2", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "}" ]
Test method for {@link ShardRecordProcessorCheckpointer#prepareCheckpoint()}.
[ "Test", "method", "for", "{", "@link", "ShardRecordProcessorCheckpointer#prepareCheckpoint", "()", "}", "." ]
[ "// First call to checkpoint", "// Advance checkpoint", "// Checkpoint using preparedCheckpoint" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 7543, 14431, 1435, 1216, 1185, 288, 203, 3639, 368, 5783, 745, 358, 9776, 203, 3639, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 203, 7734, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 3639, 4929, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 203, 3639, 14094, 21047, 3102, 1854, 21, 273, 394, 14094, 21047, 2932, 25, 11664, 8863, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 6178, 1854, 21, 1769, 203, 3639, 13893, 1564, 10437, 8208, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 5621, 203, 3639, 1815, 18163, 12, 9366, 72, 14431, 18, 9561, 14431, 9334, 3959, 774, 12, 6178, 1854, 21, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 3959, 774, 12, 6178, 1854, 21, 10019, 203, 203, 3639, 368, 4052, 5882, 9776, 203, 3639, 14094, 21047, 3102, 1854, 22, 273, 394, 14094, 21047, 2932, 9172, 29, 8863, 203, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 6178, 1854, 22, 1769, 203, 3639, 8208, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 5621, 203, 3639, 1815, 18163, 12, 9366, 72, 14431, 18, 9561, 14431, 9334, 3959, 774, 12, 6178, 1854, 22, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 3959, 774, 12, 6178, 1854, 22, 10019, 203, 203, 3639, 368, 25569, 1450, 8208, 14431, 203, 3639, 8208, 14431, 18, 25414, 5621, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 6178, 1854, 22, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 6178, 1854, 22, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 446, 620, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 707, 364, 203, 377, 380, 8901, 1232, 16490, 2115, 5164, 1564, 10437, 7, 9366, 14431, 1435, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testPrepareCheckpointRecord
null
@Test public final void testPrepareCheckpointRecord() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5025"); Record record = makeRecord("5025"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); PreparedCheckpointer preparedCheckpoint = processingCheckpointer.prepareCheckpoint(record); assertThat(checkpoint.getCheckpoint(shardId), equalTo(startingExtendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(startingExtendedSequenceNumber)); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(extendedSequenceNumber)); // Checkpoint using preparedCheckpoint preparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
/** * Test method for * {@link ShardRecordProcessorCheckpointer#prepareCheckpoint(Record record)}. */
Test method for ShardRecordProcessorCheckpointer#prepareCheckpoint(Record record).
[ "Test", "method", "for", "ShardRecordProcessorCheckpointer#prepareCheckpoint", "(", "Record", "record", ")", "." ]
@Test public final void testPrepareCheckpointRecord() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5025"); Record record = makeRecord("5025"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); PreparedCheckpointer preparedCheckpoint = processingCheckpointer.prepareCheckpoint(record); assertThat(checkpoint.getCheckpoint(shardId), equalTo(startingExtendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(startingExtendedSequenceNumber)); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(extendedSequenceNumber)); preparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
[ "@", "Test", "public", "final", "void", "testPrepareCheckpointRecord", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "ExtendedSequenceNumber", "extendedSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"5025\"", ")", ";", "Record", "record", "=", "makeRecord", "(", "\"5025\"", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "extendedSequenceNumber", ")", ";", "PreparedCheckpointer", "preparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", "record", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "startingExtendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "startingExtendedSequenceNumber", ")", ")", ";", "assertThat", "(", "preparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "preparedCheckpoint", ".", "checkpoint", "(", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "}" ]
Test method for {@link ShardRecordProcessorCheckpointer#prepareCheckpoint(Record record)}.
[ "Test", "method", "for", "{", "@link", "ShardRecordProcessorCheckpointer#prepareCheckpoint", "(", "Record", "record", ")", "}", "." ]
[ "// Checkpoint using preparedCheckpoint" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 7543, 14431, 2115, 1435, 1216, 1185, 288, 203, 3639, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 203, 7734, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 3639, 4929, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 3639, 14094, 21047, 7021, 21047, 273, 394, 14094, 21047, 2932, 3361, 2947, 8863, 203, 3639, 5059, 1409, 273, 1221, 2115, 2932, 3361, 2947, 8863, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 14948, 21047, 1769, 203, 3639, 13893, 1564, 10437, 8208, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 12, 3366, 1769, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 18526, 11456, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 18526, 11456, 21047, 10019, 203, 3639, 1815, 18163, 12, 9366, 72, 14431, 18, 9561, 14431, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 203, 3639, 368, 25569, 1450, 8208, 14431, 203, 3639, 8208, 14431, 18, 25414, 5621, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 446, 620, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 707, 364, 203, 377, 380, 8901, 1232, 16490, 2115, 5164, 1564, 10437, 7, 9366, 14431, 12, 2115, 1409, 13, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testPrepareCheckpointSubRecord
null
@Test public final void testPrepareCheckpointSubRecord() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5030"); Record record = makeRecord("5030"); //UserRecord subRecord = new UserRecord(record); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); PreparedCheckpointer preparedCheckpoint = processingCheckpointer.prepareCheckpoint(record); assertThat(checkpoint.getCheckpoint(shardId), equalTo(startingExtendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(startingExtendedSequenceNumber)); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(extendedSequenceNumber)); // Checkpoint using preparedCheckpoint preparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
/** * Test method for * {@link ShardRecordProcessorCheckpointer#prepareCheckpoint(Record record)}. */
Test method for ShardRecordProcessorCheckpointer#prepareCheckpoint(Record record).
[ "Test", "method", "for", "ShardRecordProcessorCheckpointer#prepareCheckpoint", "(", "Record", "record", ")", "." ]
@Test public final void testPrepareCheckpointSubRecord() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5030"); Record record = makeRecord("5030"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); PreparedCheckpointer preparedCheckpoint = processingCheckpointer.prepareCheckpoint(record); assertThat(checkpoint.getCheckpoint(shardId), equalTo(startingExtendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(startingExtendedSequenceNumber)); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(extendedSequenceNumber)); preparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
[ "@", "Test", "public", "final", "void", "testPrepareCheckpointSubRecord", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "ExtendedSequenceNumber", "extendedSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"5030\"", ")", ";", "Record", "record", "=", "makeRecord", "(", "\"5030\"", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "extendedSequenceNumber", ")", ";", "PreparedCheckpointer", "preparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", "record", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "startingExtendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "startingExtendedSequenceNumber", ")", ")", ";", "assertThat", "(", "preparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "preparedCheckpoint", ".", "checkpoint", "(", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "}" ]
Test method for {@link ShardRecordProcessorCheckpointer#prepareCheckpoint(Record record)}.
[ "Test", "method", "for", "{", "@link", "ShardRecordProcessorCheckpointer#prepareCheckpoint", "(", "Record", "record", ")", "}", "." ]
[ "//UserRecord subRecord = new UserRecord(record);", "// Checkpoint using preparedCheckpoint" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 7543, 14431, 1676, 2115, 1435, 1216, 1185, 288, 203, 3639, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 203, 7734, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 3639, 4929, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 3639, 14094, 21047, 7021, 21047, 273, 394, 14094, 21047, 2932, 3361, 5082, 8863, 203, 3639, 5059, 1409, 273, 1221, 2115, 2932, 3361, 5082, 8863, 203, 3639, 368, 1299, 2115, 720, 2115, 273, 394, 2177, 2115, 12, 3366, 1769, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 14948, 21047, 1769, 203, 3639, 13893, 1564, 10437, 8208, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 12, 3366, 1769, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 18526, 11456, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 18526, 11456, 21047, 10019, 203, 3639, 1815, 18163, 12, 9366, 72, 14431, 18, 9561, 14431, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 203, 3639, 368, 25569, 1450, 8208, 14431, 203, 3639, 8208, 14431, 18, 25414, 5621, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 446, 620, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 707, 364, 203, 377, 380, 8901, 1232, 16490, 2115, 5164, 1564, 10437, 7, 9366, 14431, 12, 2115, 1409, 13, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testPrepareCheckpointSequenceNumber
null
@Test public final void testPrepareCheckpointSequenceNumber() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5035"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); PreparedCheckpointer preparedCheckpoint = processingCheckpointer.prepareCheckpoint("5035"); assertThat(checkpoint.getCheckpoint(shardId), equalTo(startingExtendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(startingExtendedSequenceNumber)); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(extendedSequenceNumber)); // Checkpoint using preparedCheckpoint preparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
/** * Test method for * {@link ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber)}. */
Test method for ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber).
[ "Test", "method", "for", "ShardRecordProcessorCheckpointer#checkpoint", "(", "String", "sequenceNumber", ")", "." ]
@Test public final void testPrepareCheckpointSequenceNumber() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5035"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); PreparedCheckpointer preparedCheckpoint = processingCheckpointer.prepareCheckpoint("5035"); assertThat(checkpoint.getCheckpoint(shardId), equalTo(startingExtendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(startingExtendedSequenceNumber)); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(extendedSequenceNumber)); preparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
[ "@", "Test", "public", "final", "void", "testPrepareCheckpointSequenceNumber", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "ExtendedSequenceNumber", "extendedSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"5035\"", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "extendedSequenceNumber", ")", ";", "PreparedCheckpointer", "preparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", "\"5035\"", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "startingExtendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "startingExtendedSequenceNumber", ")", ")", ";", "assertThat", "(", "preparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "preparedCheckpoint", ".", "checkpoint", "(", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "}" ]
Test method for {@link ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber)}.
[ "Test", "method", "for", "{", "@link", "ShardRecordProcessorCheckpointer#checkpoint", "(", "String", "sequenceNumber", ")", "}", "." ]
[ "// Checkpoint using preparedCheckpoint" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 7543, 14431, 21047, 1435, 1216, 1185, 288, 203, 3639, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 3639, 4929, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 3639, 14094, 21047, 7021, 21047, 273, 394, 14094, 21047, 2932, 3361, 4763, 8863, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 14948, 21047, 1769, 203, 3639, 13893, 1564, 10437, 8208, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 2932, 3361, 4763, 8863, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 18526, 11456, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 18526, 11456, 21047, 10019, 203, 3639, 1815, 18163, 12, 9366, 72, 14431, 18, 9561, 14431, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 203, 3639, 368, 25569, 1450, 8208, 14431, 203, 3639, 8208, 14431, 18, 25414, 5621, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 446, 620, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 707, 364, 203, 377, 380, 8901, 1232, 16490, 2115, 5164, 1564, 10437, 7, 25414, 12, 780, 3102, 1854, 13, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testPrepareCheckpointExtendedSequenceNumber
null
@Test public final void testPrepareCheckpointExtendedSequenceNumber() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5040"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); PreparedCheckpointer preparedCheckpoint = processingCheckpointer.prepareCheckpoint("5040", 0); assertThat(checkpoint.getCheckpoint(shardId), equalTo(startingExtendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(startingExtendedSequenceNumber)); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(extendedSequenceNumber)); // Checkpoint using preparedCheckpoint preparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
/** * Test method for * {@link ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber, long subSequenceNumber)}. */
Test method for ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber, long subSequenceNumber).
[ "Test", "method", "for", "ShardRecordProcessorCheckpointer#checkpoint", "(", "String", "sequenceNumber", "long", "subSequenceNumber", ")", "." ]
@Test public final void testPrepareCheckpointExtendedSequenceNumber() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); ExtendedSequenceNumber extendedSequenceNumber = new ExtendedSequenceNumber("5040"); processingCheckpointer.largestPermittedCheckpointValue(extendedSequenceNumber); PreparedCheckpointer preparedCheckpoint = processingCheckpointer.prepareCheckpoint("5040", 0); assertThat(checkpoint.getCheckpoint(shardId), equalTo(startingExtendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(startingExtendedSequenceNumber)); assertThat(preparedCheckpoint.pendingCheckpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(extendedSequenceNumber)); preparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(extendedSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
[ "@", "Test", "public", "final", "void", "testPrepareCheckpointExtendedSequenceNumber", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "ExtendedSequenceNumber", "extendedSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"5040\"", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "extendedSequenceNumber", ")", ";", "PreparedCheckpointer", "preparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", "\"5040\"", ",", "0", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "startingExtendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "startingExtendedSequenceNumber", ")", ")", ";", "assertThat", "(", "preparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "preparedCheckpoint", ".", "checkpoint", "(", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "extendedSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "}" ]
Test method for {@link ShardRecordProcessorCheckpointer#checkpoint(String sequenceNumber, long subSequenceNumber)}.
[ "Test", "method", "for", "{", "@link", "ShardRecordProcessorCheckpointer#checkpoint", "(", "String", "sequenceNumber", "long", "subSequenceNumber", ")", "}", "." ]
[ "// Checkpoint using preparedCheckpoint" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 7543, 14431, 11456, 21047, 1435, 1216, 1185, 288, 203, 3639, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 3639, 4929, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 3639, 14094, 21047, 7021, 21047, 273, 394, 14094, 21047, 2932, 25, 3028, 20, 8863, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 14948, 21047, 1769, 203, 3639, 13893, 1564, 10437, 8208, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 2932, 25, 3028, 20, 3113, 374, 1769, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 18526, 11456, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 18526, 11456, 21047, 10019, 203, 3639, 1815, 18163, 12, 9366, 72, 14431, 18, 9561, 14431, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 203, 3639, 368, 25569, 1450, 8208, 14431, 203, 3639, 8208, 14431, 18, 25414, 5621, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 14948, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 446, 620, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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203, 377, 380, 8901, 1232, 16490, 2115, 5164, 1564, 10437, 7, 25414, 12, 780, 3102, 1854, 16, 1525, 720, 21047, 13, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testMultipleOutstandingCheckpointersHappyCase
null
@Test public final void testMultipleOutstandingCheckpointersHappyCase() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); processingCheckpointer.largestPermittedCheckpointValue(new ExtendedSequenceNumber("6040")); ExtendedSequenceNumber sn1 = new ExtendedSequenceNumber("6010"); PreparedCheckpointer firstPreparedCheckpoint = processingCheckpointer.prepareCheckpoint("6010", 0); assertThat(firstPreparedCheckpoint.pendingCheckpoint(), equalTo(sn1)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sn1)); ExtendedSequenceNumber sn2 = new ExtendedSequenceNumber("6020"); PreparedCheckpointer secondPreparedCheckpoint = processingCheckpointer.prepareCheckpoint("6020", 0); assertThat(secondPreparedCheckpoint.pendingCheckpoint(), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sn2)); // checkpoint in order firstPreparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(sn1)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(sn1)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); secondPreparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
/** * Test that having multiple outstanding prepared checkpointers works if they are redeemed in the right order. */
Test that having multiple outstanding prepared checkpointers works if they are redeemed in the right order.
[ "Test", "that", "having", "multiple", "outstanding", "prepared", "checkpointers", "works", "if", "they", "are", "redeemed", "in", "the", "right", "order", "." ]
@Test public final void testMultipleOutstandingCheckpointersHappyCase() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); processingCheckpointer.largestPermittedCheckpointValue(new ExtendedSequenceNumber("6040")); ExtendedSequenceNumber sn1 = new ExtendedSequenceNumber("6010"); PreparedCheckpointer firstPreparedCheckpoint = processingCheckpointer.prepareCheckpoint("6010", 0); assertThat(firstPreparedCheckpoint.pendingCheckpoint(), equalTo(sn1)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sn1)); ExtendedSequenceNumber sn2 = new ExtendedSequenceNumber("6020"); PreparedCheckpointer secondPreparedCheckpoint = processingCheckpointer.prepareCheckpoint("6020", 0); assertThat(secondPreparedCheckpoint.pendingCheckpoint(), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sn2)); firstPreparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(sn1)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(sn1)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); secondPreparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); }
[ "@", "Test", "public", "final", "void", "testMultipleOutstandingCheckpointersHappyCase", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "new", "ExtendedSequenceNumber", "(", "\"6040\"", ")", ")", ";", "ExtendedSequenceNumber", "sn1", "=", "new", "ExtendedSequenceNumber", "(", "\"6010\"", ")", ";", "PreparedCheckpointer", "firstPreparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", "\"6010\"", ",", "0", ")", ";", "assertThat", "(", "firstPreparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sn1", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sn1", ")", ")", ";", "ExtendedSequenceNumber", "sn2", "=", "new", "ExtendedSequenceNumber", "(", "\"6020\"", ")", ";", "PreparedCheckpointer", "secondPreparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", "\"6020\"", ",", "0", ")", ";", "assertThat", "(", "secondPreparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sn2", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sn2", ")", ")", ";", "firstPreparedCheckpoint", ".", "checkpoint", "(", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "sn1", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "sn1", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "secondPreparedCheckpoint", ".", "checkpoint", "(", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "sn2", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "sn2", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "}" ]
Test that having multiple outstanding prepared checkpointers works if they are redeemed in the right order.
[ "Test", "that", "having", "multiple", "outstanding", "prepared", "checkpointers", "works", "if", "they", "are", "redeemed", "in", "the", "right", "order", "." ]
[ "// checkpoint in order" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 8438, 1182, 15167, 1564, 10437, 87, 44, 438, 2074, 2449, 1435, 1216, 1185, 288, 203, 3639, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 3639, 4929, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 2704, 14094, 21047, 2932, 26, 3028, 20, 7923, 1769, 203, 203, 3639, 14094, 21047, 4556, 21, 273, 394, 14094, 21047, 2932, 26, 23254, 8863, 203, 3639, 13893, 1564, 10437, 1122, 15464, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 2932, 26, 23254, 3113, 374, 1769, 203, 3639, 1815, 18163, 12, 3645, 15464, 14431, 18, 9561, 14431, 9334, 3959, 774, 12, 8134, 21, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 3959, 774, 12, 8134, 21, 10019, 203, 203, 3639, 14094, 21047, 4556, 22, 273, 394, 14094, 21047, 2932, 26, 3103, 20, 8863, 203, 3639, 13893, 1564, 10437, 2205, 15464, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 2932, 26, 3103, 20, 3113, 374, 1769, 203, 3639, 1815, 18163, 12, 8538, 15464, 14431, 18, 9561, 14431, 9334, 3959, 774, 12, 8134, 22, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 3959, 774, 12, 8134, 22, 10019, 203, 203, 3639, 368, 9776, 316, 1353, 203, 3639, 1122, 15464, 14431, 18, 25414, 5621, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 8134, 21, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 8134, 21, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 446, 620, 10663, 203, 203, 3639, 2205, 15464, 14431, 18, 25414, 5621, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 8134, 22, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 8134, 22, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 446, 620,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, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testMultipleOutstandingCheckpointersOutOfOrder
null
@Test public final void testMultipleOutstandingCheckpointersOutOfOrder() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); processingCheckpointer.largestPermittedCheckpointValue(new ExtendedSequenceNumber("7040")); ExtendedSequenceNumber sn1 = new ExtendedSequenceNumber("7010"); PreparedCheckpointer firstPreparedCheckpoint = processingCheckpointer.prepareCheckpoint("7010", 0); assertThat(firstPreparedCheckpoint.pendingCheckpoint(), equalTo(sn1)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sn1)); ExtendedSequenceNumber sn2 = new ExtendedSequenceNumber("7020"); PreparedCheckpointer secondPreparedCheckpoint = processingCheckpointer.prepareCheckpoint("7020", 0); assertThat(secondPreparedCheckpoint.pendingCheckpoint(), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sn2)); // checkpoint out of order secondPreparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); try { firstPreparedCheckpoint.checkpoint(); fail("checkpoint() should have failed because the sequence number was too low"); } catch (IllegalArgumentException e) { } catch (Exception e) { fail("checkpoint() should have thrown an IllegalArgumentException but instead threw " + e); } }
/** * Test that having multiple outstanding prepared checkpointers works if they are redeemed in the right order. */
Test that having multiple outstanding prepared checkpointers works if they are redeemed in the right order.
[ "Test", "that", "having", "multiple", "outstanding", "prepared", "checkpointers", "works", "if", "they", "are", "redeemed", "in", "the", "right", "order", "." ]
@Test public final void testMultipleOutstandingCheckpointersOutOfOrder() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); processingCheckpointer.setInitialCheckpointValue(startingExtendedSequenceNumber); processingCheckpointer.largestPermittedCheckpointValue(new ExtendedSequenceNumber("7040")); ExtendedSequenceNumber sn1 = new ExtendedSequenceNumber("7010"); PreparedCheckpointer firstPreparedCheckpoint = processingCheckpointer.prepareCheckpoint("7010", 0); assertThat(firstPreparedCheckpoint.pendingCheckpoint(), equalTo(sn1)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sn1)); ExtendedSequenceNumber sn2 = new ExtendedSequenceNumber("7020"); PreparedCheckpointer secondPreparedCheckpoint = processingCheckpointer.prepareCheckpoint("7020", 0); assertThat(secondPreparedCheckpoint.pendingCheckpoint(), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(sn2)); secondPreparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(sn2)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); try { firstPreparedCheckpoint.checkpoint(); fail("checkpoint() should have failed because the sequence number was too low"); } catch (IllegalArgumentException e) { } catch (Exception e) { fail("checkpoint() should have thrown an IllegalArgumentException but instead threw " + e); } }
[ "@", "Test", "public", "final", "void", "testMultipleOutstandingCheckpointersOutOfOrder", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "startingExtendedSequenceNumber", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "new", "ExtendedSequenceNumber", "(", "\"7040\"", ")", ")", ";", "ExtendedSequenceNumber", "sn1", "=", "new", "ExtendedSequenceNumber", "(", "\"7010\"", ")", ";", "PreparedCheckpointer", "firstPreparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", "\"7010\"", ",", "0", ")", ";", "assertThat", "(", "firstPreparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sn1", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sn1", ")", ")", ";", "ExtendedSequenceNumber", "sn2", "=", "new", "ExtendedSequenceNumber", "(", "\"7020\"", ")", ";", "PreparedCheckpointer", "secondPreparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", "\"7020\"", ",", "0", ")", ";", "assertThat", "(", "secondPreparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sn2", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "sn2", ")", ")", ";", "secondPreparedCheckpoint", ".", "checkpoint", "(", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "sn2", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "sn2", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "try", "{", "firstPreparedCheckpoint", ".", "checkpoint", "(", ")", ";", "fail", "(", "\"checkpoint() should have failed because the sequence number was too low\"", ")", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "}", "catch", "(", "Exception", "e", ")", "{", "fail", "(", "\"checkpoint() should have thrown an IllegalArgumentException but instead threw \"", "+", "e", ")", ";", "}", "}" ]
Test that having multiple outstanding prepared checkpointers works if they are redeemed in the right order.
[ "Test", "that", "having", "multiple", "outstanding", "prepared", "checkpointers", "works", "if", "they", "are", "redeemed", "in", "the", "right", "order", "." ]
[ "// checkpoint out of order" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 8438, 1182, 15167, 1564, 10437, 87, 11224, 2448, 1435, 1216, 1185, 288, 203, 3639, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 3639, 4929, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 18526, 11456, 21047, 1769, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 2704, 14094, 21047, 2932, 27, 3028, 20, 7923, 1769, 203, 203, 3639, 14094, 21047, 4556, 21, 273, 394, 14094, 21047, 2932, 27, 23254, 8863, 203, 3639, 13893, 1564, 10437, 1122, 15464, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 2932, 27, 23254, 3113, 374, 1769, 203, 3639, 1815, 18163, 12, 3645, 15464, 14431, 18, 9561, 14431, 9334, 3959, 774, 12, 8134, 21, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 3959, 774, 12, 8134, 21, 10019, 203, 203, 3639, 14094, 21047, 4556, 22, 273, 394, 14094, 21047, 2932, 27, 3103, 20, 8863, 203, 3639, 13893, 1564, 10437, 2205, 15464, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 2932, 27, 3103, 20, 3113, 374, 1769, 203, 3639, 1815, 18163, 12, 8538, 15464, 14431, 18, 9561, 14431, 9334, 3959, 774, 12, 8134, 22, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 3959, 774, 12, 8134, 22, 10019, 203, 203, 3639, 368, 9776, 596, 434, 1353, 203, 3639, 2205, 15464, 14431, 18, 25414, 5621, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 8134, 22, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 8134, 22, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 446, 620, 10663, 203, 203, 3639, 775, 288, 203, 5411, 1122, 15464, 14431, 18, 25414, 5621, 203, 5411, 2321, 2932, 25414, 1435, 1410, 1240, 2535, 2724, 326, 3102, 1300, 1703, 4885, 4587, 8863, 203, 3639, 289, 1044, 261, 31237, 425, 13, 288, 203, 3639, 289, 1044, 261, 503, 425, 13, 288, 203, 5411, 2321, 2932, 25414, 1435, 1410, 1240, 6718, 392, 2754, 1496, 3560, 21146, 315, 397, 425, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 716, 7999, 3229, 20974, 8208, 866, 10437, 87, 6330, 309, 2898, 854, 283, 24903, 329, 316, 326, 2145, 1353, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testClientSpecifiedCheckpoint
null
@Test public final void testClientSpecifiedCheckpoint() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); // Several checkpoints we're gonna hit ExtendedSequenceNumber tooSmall = new ExtendedSequenceNumber("2"); ExtendedSequenceNumber firstSequenceNumber = checkpoint.getCheckpoint(shardId); // 13 ExtendedSequenceNumber secondSequenceNumber = new ExtendedSequenceNumber("127"); ExtendedSequenceNumber thirdSequenceNumber = new ExtendedSequenceNumber("5019"); ExtendedSequenceNumber lastSequenceNumberOfShard = new ExtendedSequenceNumber("6789"); ExtendedSequenceNumber tooBigSequenceNumber = new ExtendedSequenceNumber("9000"); processingCheckpointer.setInitialCheckpointValue(firstSequenceNumber); processingCheckpointer.largestPermittedCheckpointValue(thirdSequenceNumber); // confirm that we cannot move backward try { processingCheckpointer.checkpoint(tooSmall.sequenceNumber(), tooSmall.subSequenceNumber()); fail("You shouldn't be able to checkpoint earlier than the initial checkpoint."); } catch (IllegalArgumentException e) { // yay! } // advance to first processingCheckpointer.checkpoint(firstSequenceNumber.sequenceNumber(), firstSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(firstSequenceNumber)); processingCheckpointer.checkpoint(firstSequenceNumber.sequenceNumber(), firstSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(firstSequenceNumber)); // advance to second processingCheckpointer.checkpoint(secondSequenceNumber.sequenceNumber(), secondSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(secondSequenceNumber)); ExtendedSequenceNumber[] valuesWeShouldNotBeAbleToCheckpointAt = { tooSmall, // Shouldn't be able to move before the first value we ever checkpointed firstSequenceNumber, // Shouldn't even be able to move back to a once used sequence number tooBigSequenceNumber, // Can't exceed the max sequence number in the checkpointer lastSequenceNumberOfShard, // Just another big value that we will use later null, // Not a valid sequence number new ExtendedSequenceNumber("bogus-checkpoint-value"), // Can't checkpoint at non-numeric string ExtendedSequenceNumber.SHARD_END, // Can't go to the end unless it is set as the max ExtendedSequenceNumber.TRIM_HORIZON, // Can't go back to an initial sentinel value ExtendedSequenceNumber.LATEST // Can't go back to an initial sentinel value }; for (ExtendedSequenceNumber badCheckpointValue : valuesWeShouldNotBeAbleToCheckpointAt) { try { processingCheckpointer.checkpoint(badCheckpointValue.sequenceNumber(), badCheckpointValue.subSequenceNumber()); fail("checkpointing at bad or out of order sequence didn't throw exception"); } catch (IllegalArgumentException e) { } catch (NullPointerException e) { } assertThat("Checkpoint value should not have changed", checkpoint.getCheckpoint(shardId), equalTo(secondSequenceNumber)); assertThat("Last checkpoint value should not have changed", processingCheckpointer.lastCheckpointValue(), equalTo(secondSequenceNumber)); assertThat("Largest sequence number should not have changed", processingCheckpointer.largestPermittedCheckpointValue(), equalTo(thirdSequenceNumber)); } // advance to third number processingCheckpointer.checkpoint(thirdSequenceNumber.sequenceNumber(), thirdSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(thirdSequenceNumber)); // Testing a feature that prevents checkpointing at SHARD_END twice processingCheckpointer.largestPermittedCheckpointValue(lastSequenceNumberOfShard); processingCheckpointer.sequenceNumberAtShardEnd(processingCheckpointer.largestPermittedCheckpointValue()); processingCheckpointer.largestPermittedCheckpointValue(ExtendedSequenceNumber.SHARD_END); processingCheckpointer.checkpoint(lastSequenceNumberOfShard.sequenceNumber(), lastSequenceNumberOfShard.subSequenceNumber()); assertThat( "Checkpoing at the sequence number at the end of a shard should be the same as checkpointing at SHARD_END", processingCheckpointer.lastCheckpointValue(), equalTo(ExtendedSequenceNumber.SHARD_END)); }
/* * This test is a mixed test of checking some basic functionality of checkpointing at a sequence number and making * sure certain bounds checks and validations are being performed inside the checkpointer to prevent clients from * checkpointing out of order/too big/non-numeric values that aren't valid strings for them to be checkpointing */
This test is a mixed test of checking some basic functionality of checkpointing at a sequence number and making sure certain bounds checks and validations are being performed inside the checkpointer to prevent clients from checkpointing out of order/too big/non-numeric values that aren't valid strings for them to be checkpointing
[ "This", "test", "is", "a", "mixed", "test", "of", "checking", "some", "basic", "functionality", "of", "checkpointing", "at", "a", "sequence", "number", "and", "making", "sure", "certain", "bounds", "checks", "and", "validations", "are", "being", "performed", "inside", "the", "checkpointer", "to", "prevent", "clients", "from", "checkpointing", "out", "of", "order", "/", "too", "big", "/", "non", "-", "numeric", "values", "that", "aren", "'", "t", "valid", "strings", "for", "them", "to", "be", "checkpointing" ]
@Test public final void testClientSpecifiedCheckpoint() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); ExtendedSequenceNumber tooSmall = new ExtendedSequenceNumber("2"); ExtendedSequenceNumber firstSequenceNumber = checkpoint.getCheckpoint(shardId); ExtendedSequenceNumber secondSequenceNumber = new ExtendedSequenceNumber("127"); ExtendedSequenceNumber thirdSequenceNumber = new ExtendedSequenceNumber("5019"); ExtendedSequenceNumber lastSequenceNumberOfShard = new ExtendedSequenceNumber("6789"); ExtendedSequenceNumber tooBigSequenceNumber = new ExtendedSequenceNumber("9000"); processingCheckpointer.setInitialCheckpointValue(firstSequenceNumber); processingCheckpointer.largestPermittedCheckpointValue(thirdSequenceNumber); try { processingCheckpointer.checkpoint(tooSmall.sequenceNumber(), tooSmall.subSequenceNumber()); fail("You shouldn't be able to checkpoint earlier than the initial checkpoint."); } catch (IllegalArgumentException e) { } processingCheckpointer.checkpoint(firstSequenceNumber.sequenceNumber(), firstSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(firstSequenceNumber)); processingCheckpointer.checkpoint(firstSequenceNumber.sequenceNumber(), firstSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(firstSequenceNumber)); processingCheckpointer.checkpoint(secondSequenceNumber.sequenceNumber(), secondSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(secondSequenceNumber)); ExtendedSequenceNumber[] valuesWeShouldNotBeAbleToCheckpointAt = { tooSmall, firstSequenceNumber, tooBigSequenceNumber, lastSequenceNumberOfShard, null, new ExtendedSequenceNumber("bogus-checkpoint-value"), ExtendedSequenceNumber.SHARD_END, ExtendedSequenceNumber.TRIM_HORIZON, ExtendedSequenceNumber.LATEST }; for (ExtendedSequenceNumber badCheckpointValue : valuesWeShouldNotBeAbleToCheckpointAt) { try { processingCheckpointer.checkpoint(badCheckpointValue.sequenceNumber(), badCheckpointValue.subSequenceNumber()); fail("checkpointing at bad or out of order sequence didn't throw exception"); } catch (IllegalArgumentException e) { } catch (NullPointerException e) { } assertThat("Checkpoint value should not have changed", checkpoint.getCheckpoint(shardId), equalTo(secondSequenceNumber)); assertThat("Last checkpoint value should not have changed", processingCheckpointer.lastCheckpointValue(), equalTo(secondSequenceNumber)); assertThat("Largest sequence number should not have changed", processingCheckpointer.largestPermittedCheckpointValue(), equalTo(thirdSequenceNumber)); } processingCheckpointer.checkpoint(thirdSequenceNumber.sequenceNumber(), thirdSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(thirdSequenceNumber)); processingCheckpointer.largestPermittedCheckpointValue(lastSequenceNumberOfShard); processingCheckpointer.sequenceNumberAtShardEnd(processingCheckpointer.largestPermittedCheckpointValue()); processingCheckpointer.largestPermittedCheckpointValue(ExtendedSequenceNumber.SHARD_END); processingCheckpointer.checkpoint(lastSequenceNumberOfShard.sequenceNumber(), lastSequenceNumberOfShard.subSequenceNumber()); assertThat( "Checkpoing at the sequence number at the end of a shard should be the same as checkpointing at SHARD_END", processingCheckpointer.lastCheckpointValue(), equalTo(ExtendedSequenceNumber.SHARD_END)); }
[ "@", "Test", "public", "final", "void", "testClientSpecifiedCheckpoint", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "ExtendedSequenceNumber", "tooSmall", "=", "new", "ExtendedSequenceNumber", "(", "\"2\"", ")", ";", "ExtendedSequenceNumber", "firstSequenceNumber", "=", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ";", "ExtendedSequenceNumber", "secondSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"127\"", ")", ";", "ExtendedSequenceNumber", "thirdSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"5019\"", ")", ";", "ExtendedSequenceNumber", "lastSequenceNumberOfShard", "=", "new", "ExtendedSequenceNumber", "(", "\"6789\"", ")", ";", "ExtendedSequenceNumber", "tooBigSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"9000\"", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "firstSequenceNumber", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "thirdSequenceNumber", ")", ";", "try", "{", "processingCheckpointer", ".", "checkpoint", "(", "tooSmall", ".", "sequenceNumber", "(", ")", ",", "tooSmall", ".", "subSequenceNumber", "(", ")", ")", ";", "fail", "(", "\"You shouldn't be able to checkpoint earlier than the initial checkpoint.\"", ")", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "}", "processingCheckpointer", ".", "checkpoint", "(", "firstSequenceNumber", ".", "sequenceNumber", "(", ")", ",", "firstSequenceNumber", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "firstSequenceNumber", ")", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", "firstSequenceNumber", ".", "sequenceNumber", "(", ")", ",", "firstSequenceNumber", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "firstSequenceNumber", ")", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", "secondSequenceNumber", ".", "sequenceNumber", "(", ")", ",", "secondSequenceNumber", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "secondSequenceNumber", ")", ")", ";", "ExtendedSequenceNumber", "[", "]", "valuesWeShouldNotBeAbleToCheckpointAt", "=", "{", "tooSmall", ",", "firstSequenceNumber", ",", "tooBigSequenceNumber", ",", "lastSequenceNumberOfShard", ",", "null", ",", "new", "ExtendedSequenceNumber", "(", "\"bogus-checkpoint-value\"", ")", ",", "ExtendedSequenceNumber", ".", "SHARD_END", ",", "ExtendedSequenceNumber", ".", "TRIM_HORIZON", ",", "ExtendedSequenceNumber", ".", "LATEST", "}", ";", "for", "(", "ExtendedSequenceNumber", "badCheckpointValue", ":", "valuesWeShouldNotBeAbleToCheckpointAt", ")", "{", "try", "{", "processingCheckpointer", ".", "checkpoint", "(", "badCheckpointValue", ".", "sequenceNumber", "(", ")", ",", "badCheckpointValue", ".", "subSequenceNumber", "(", ")", ")", ";", "fail", "(", "\"checkpointing at bad or out of order sequence didn't throw exception\"", ")", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "}", "catch", "(", "NullPointerException", "e", ")", "{", "}", "assertThat", "(", "\"Checkpoint value should not have changed\"", ",", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "secondSequenceNumber", ")", ")", ";", "assertThat", "(", "\"Last checkpoint value should not have changed\"", ",", "processingCheckpointer", ".", "lastCheckpointValue", "(", ")", ",", "equalTo", "(", "secondSequenceNumber", ")", ")", ";", "assertThat", "(", "\"Largest sequence number should not have changed\"", ",", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", ")", ",", "equalTo", "(", "thirdSequenceNumber", ")", ")", ";", "}", "processingCheckpointer", ".", "checkpoint", "(", "thirdSequenceNumber", ".", "sequenceNumber", "(", ")", ",", "thirdSequenceNumber", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "thirdSequenceNumber", ")", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "lastSequenceNumberOfShard", ")", ";", "processingCheckpointer", ".", "sequenceNumberAtShardEnd", "(", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", ")", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "ExtendedSequenceNumber", ".", "SHARD_END", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", "lastSequenceNumberOfShard", ".", "sequenceNumber", "(", ")", ",", "lastSequenceNumberOfShard", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "\"Checkpoing at the sequence number at the end of a shard should be the same as checkpointing at SHARD_END\"", ",", "processingCheckpointer", ".", "lastCheckpointValue", "(", ")", ",", "equalTo", "(", "ExtendedSequenceNumber", ".", "SHARD_END", ")", ")", ";", "}" ]
This test is a mixed test of checking some basic functionality of checkpointing at a sequence number and making sure certain bounds checks and validations are being performed inside the checkpointer to prevent clients from checkpointing out of order/too big/non-numeric values that aren't valid strings for them to be checkpointing
[ "This", "test", "is", "a", "mixed", "test", "of", "checking", "some", "basic", "functionality", "of", "checkpointing", "at", "a", "sequence", "number", "and", "making", "sure", "certain", "bounds", "checks", "and", "validations", "are", "being", "performed", "inside", "the", "checkpointer", "to", "prevent", "clients", "from", "checkpointing", "out", "of", "order", "/", "too", "big", "/", "non", "-", "numeric", "values", "that", "aren", "'", "t", "valid", "strings", "for", "them", "to", "be", "checkpointing" ]
[ "// Several checkpoints we're gonna hit", "// 13", "// confirm that we cannot move backward", "// yay!", "// advance to first", "// advance to second", "// Shouldn't be able to move before the first value we ever checkpointed", "// Shouldn't even be able to move back to a once used sequence number", "// Can't exceed the max sequence number in the checkpointer", "// Just another big value that we will use later", "// Not a valid sequence number", "// Can't checkpoint at non-numeric string", "// Can't go to the end unless it is set as the max", "// Can't go back to an initial sentinel value", "// Can't go back to an initial sentinel value", "// advance to third number", "// Testing a feature that prevents checkpointing at SHARD_END twice" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 1227, 17068, 14431, 1435, 1216, 1185, 288, 203, 3639, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 203, 3639, 368, 3265, 502, 287, 26402, 732, 4565, 314, 265, 6582, 6800, 203, 3639, 14094, 21047, 4885, 19187, 273, 394, 14094, 21047, 2932, 22, 8863, 203, 3639, 14094, 21047, 1122, 21047, 273, 9776, 18, 588, 14431, 12, 22630, 548, 1769, 368, 5958, 203, 3639, 14094, 21047, 2205, 21047, 273, 394, 14094, 21047, 2932, 14260, 8863, 203, 3639, 14094, 21047, 12126, 21047, 273, 394, 14094, 21047, 2932, 9172, 29, 8863, 203, 3639, 14094, 21047, 1142, 4021, 9226, 8428, 273, 394, 14094, 21047, 2932, 9599, 6675, 8863, 203, 3639, 14094, 21047, 4885, 9901, 21047, 273, 394, 14094, 21047, 2932, 29, 3784, 8863, 203, 203, 3639, 4929, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 3645, 21047, 1769, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 451, 6909, 21047, 1769, 203, 203, 3639, 368, 6932, 716, 732, 2780, 3635, 12555, 203, 3639, 775, 288, 203, 5411, 4929, 1564, 10437, 18, 25414, 12, 16431, 19187, 18, 6178, 1854, 9334, 4885, 19187, 18, 1717, 21047, 10663, 203, 5411, 2321, 2932, 6225, 12044, 1404, 506, 7752, 358, 9776, 13805, 2353, 326, 2172, 9776, 1199, 1769, 203, 3639, 289, 1044, 261, 31237, 425, 13, 288, 203, 5411, 368, 677, 528, 5, 203, 3639, 289, 203, 203, 3639, 368, 8312, 358, 1122, 203, 3639, 4929, 1564, 10437, 18, 25414, 12, 3645, 21047, 18, 6178, 1854, 9334, 1122, 21047, 18, 1717, 21047, 10663, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 3645, 21047, 10019, 203, 3639, 4929, 1564, 10437, 18, 25414, 12, 3645, 21047, 18, 6178, 1854, 9334, 1122, 21047, 18, 1717, 21047, 10663, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 3645, 21047, 10019, 203, 203, 3639, 368, 8312, 358, 2205, 203, 3639, 4929, 1564, 10437, 18, 25414, 12, 8538, 21047, 18, 6178, 1854, 9334, 2205, 21047, 18, 1717, 21047, 10663, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 8538, 21047, 10019, 203, 203, 3639, 14094, 21047, 8526, 924, 3218, 14309, 1248, 1919, 5895, 298, 774, 14431, 861, 273, 203, 3639, 288, 4885, 19187, 16, 368, 9363, 82, 1404, 506, 7752, 358, 3635, 1865, 326, 1122, 460, 732, 14103, 9776, 329, 203, 7734, 1122, 21047, 16, 368, 9363, 82, 1404, 5456, 506, 7752, 358, 3635, 1473, 358, 279, 3647, 1399, 3102, 1300, 203, 7734, 4885, 9901, 21047, 16, 368, 4480, 1404, 9943, 326, 943, 3102, 1300, 316, 326, 866, 10437, 203, 7734, 1142, 4021, 9226, 8428, 16, 368, 12526, 4042, 5446, 460, 716, 732, 903, 999, 5137, 203, 7734, 446, 16, 368, 2288, 279, 923, 3102, 1300, 203, 7734, 394, 14094, 21047, 2932, 70, 28774, 17, 25414, 17, 1132, 6, 3631, 368, 4480, 1404, 9776, 622, 1661, 17, 5246, 533, 203, 7734, 14094, 21047, 18, 2664, 2 ]
[ 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 20308, 203, 377, 380, 1220, 1842, 353, 279, 7826, 1842, 434, 6728, 2690, 5337, 14176, 434, 9776, 310, 622, 279, 3102, 1300, 471, 10480, 203, 377, 380, 3071, 8626, 4972, 4271, 471, 20808, 854, 3832, 9591, 4832, 326, 866, 10437, 358, 5309, 7712, 628, 203, 377, 380, 9776, 310, 596, 434, 1353, 19, 16431, 5446, 19, 5836, 17, 5246, 924, 716, 11526, 1404, 923, 2064, 364, 2182, 358, 506, 9776, 310, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testClientSpecifiedTwoPhaseCheckpoint
null
@Test public final void testClientSpecifiedTwoPhaseCheckpoint() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); // Several checkpoints we're gonna hit ExtendedSequenceNumber tooSmall = new ExtendedSequenceNumber("2"); ExtendedSequenceNumber firstSequenceNumber = checkpoint.getCheckpoint(shardId); // 13 ExtendedSequenceNumber secondSequenceNumber = new ExtendedSequenceNumber("127"); ExtendedSequenceNumber thirdSequenceNumber = new ExtendedSequenceNumber("5019"); ExtendedSequenceNumber lastSequenceNumberOfShard = new ExtendedSequenceNumber("6789"); ExtendedSequenceNumber tooBigSequenceNumber = new ExtendedSequenceNumber("9000"); processingCheckpointer.setInitialCheckpointValue(firstSequenceNumber); processingCheckpointer.largestPermittedCheckpointValue(thirdSequenceNumber); // confirm that we cannot move backward try { processingCheckpointer.prepareCheckpoint(tooSmall.sequenceNumber(), tooSmall.subSequenceNumber()); fail("You shouldn't be able to prepare a checkpoint earlier than the initial checkpoint."); } catch (IllegalArgumentException e) { // yay! } try { processingCheckpointer.checkpoint(tooSmall.sequenceNumber(), tooSmall.subSequenceNumber()); fail("You shouldn't be able to checkpoint earlier than the initial checkpoint."); } catch (IllegalArgumentException e) { // yay! } // advance to first processingCheckpointer.checkpoint(firstSequenceNumber.sequenceNumber(), firstSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(firstSequenceNumber)); // prepare checkpoint at initial checkpoint value PreparedCheckpointer doesNothingPreparedCheckpoint = processingCheckpointer.prepareCheckpoint(firstSequenceNumber.sequenceNumber(), firstSequenceNumber.subSequenceNumber()); assertThat(doesNothingPreparedCheckpoint instanceof DoesNothingPreparedCheckpointer, equalTo(true)); assertThat(doesNothingPreparedCheckpoint.pendingCheckpoint(), equalTo(firstSequenceNumber)); assertThat(checkpoint.getCheckpoint(shardId), equalTo(firstSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(firstSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); // nothing happens after checkpointing a doesNothingPreparedCheckpoint doesNothingPreparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(firstSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(firstSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); // advance to second processingCheckpointer.prepareCheckpoint(secondSequenceNumber.sequenceNumber(), secondSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(secondSequenceNumber)); processingCheckpointer.checkpoint(secondSequenceNumber.sequenceNumber(), secondSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(secondSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); ExtendedSequenceNumber[] valuesWeShouldNotBeAbleToCheckpointAt = { tooSmall, // Shouldn't be able to move before the first value we ever checkpointed firstSequenceNumber, // Shouldn't even be able to move back to a once used sequence number tooBigSequenceNumber, // Can't exceed the max sequence number in the checkpointer lastSequenceNumberOfShard, // Just another big value that we will use later null, // Not a valid sequence number new ExtendedSequenceNumber("bogus-checkpoint-value"), // Can't checkpoint at non-numeric string ExtendedSequenceNumber.SHARD_END, // Can't go to the end unless it is set as the max ExtendedSequenceNumber.TRIM_HORIZON, // Can't go back to an initial sentinel value ExtendedSequenceNumber.LATEST // Can't go back to an initial sentinel value }; for (ExtendedSequenceNumber badCheckpointValue : valuesWeShouldNotBeAbleToCheckpointAt) { try { processingCheckpointer.prepareCheckpoint(badCheckpointValue.sequenceNumber(), badCheckpointValue.subSequenceNumber()); fail("checkpointing at bad or out of order sequence didn't throw exception"); } catch (IllegalArgumentException e) { } catch (NullPointerException e) { } assertThat("Checkpoint value should not have changed", checkpoint.getCheckpoint(shardId), equalTo(secondSequenceNumber)); assertThat("Last checkpoint value should not have changed", processingCheckpointer.lastCheckpointValue(), equalTo(secondSequenceNumber)); assertThat("Largest sequence number should not have changed", processingCheckpointer.largestPermittedCheckpointValue(), equalTo(thirdSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); } // advance to third number processingCheckpointer.prepareCheckpoint(thirdSequenceNumber.sequenceNumber(), thirdSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(thirdSequenceNumber)); processingCheckpointer.checkpoint(thirdSequenceNumber.sequenceNumber(), thirdSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(thirdSequenceNumber)); // Testing a feature that prevents checkpointing at SHARD_END twice processingCheckpointer.largestPermittedCheckpointValue(lastSequenceNumberOfShard); processingCheckpointer.sequenceNumberAtShardEnd(processingCheckpointer.largestPermittedCheckpointValue()); processingCheckpointer.largestPermittedCheckpointValue(ExtendedSequenceNumber.SHARD_END); processingCheckpointer.prepareCheckpoint(lastSequenceNumberOfShard.sequenceNumber(), lastSequenceNumberOfShard.subSequenceNumber()); assertThat( "Preparing a checkpoing at the sequence number at the end of a shard should be the same as preparing a checkpoint at SHARD_END", checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(ExtendedSequenceNumber.SHARD_END)); }
/* * This test is a mixed test of checking some basic functionality of two phase checkpointing at a sequence number * and making sure certain bounds checks and validations are being performed inside the checkpointer to prevent * clients from checkpointing out of order/too big/non-numeric values that aren't valid strings for them to be * checkpointing */
This test is a mixed test of checking some basic functionality of two phase checkpointing at a sequence number and making sure certain bounds checks and validations are being performed inside the checkpointer to prevent clients from checkpointing out of order/too big/non-numeric values that aren't valid strings for them to be checkpointing
[ "This", "test", "is", "a", "mixed", "test", "of", "checking", "some", "basic", "functionality", "of", "two", "phase", "checkpointing", "at", "a", "sequence", "number", "and", "making", "sure", "certain", "bounds", "checks", "and", "validations", "are", "being", "performed", "inside", "the", "checkpointer", "to", "prevent", "clients", "from", "checkpointing", "out", "of", "order", "/", "too", "big", "/", "non", "-", "numeric", "values", "that", "aren", "'", "t", "valid", "strings", "for", "them", "to", "be", "checkpointing" ]
@Test public final void testClientSpecifiedTwoPhaseCheckpoint() throws Exception { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); ExtendedSequenceNumber tooSmall = new ExtendedSequenceNumber("2"); ExtendedSequenceNumber firstSequenceNumber = checkpoint.getCheckpoint(shardId); ExtendedSequenceNumber secondSequenceNumber = new ExtendedSequenceNumber("127"); ExtendedSequenceNumber thirdSequenceNumber = new ExtendedSequenceNumber("5019"); ExtendedSequenceNumber lastSequenceNumberOfShard = new ExtendedSequenceNumber("6789"); ExtendedSequenceNumber tooBigSequenceNumber = new ExtendedSequenceNumber("9000"); processingCheckpointer.setInitialCheckpointValue(firstSequenceNumber); processingCheckpointer.largestPermittedCheckpointValue(thirdSequenceNumber); try { processingCheckpointer.prepareCheckpoint(tooSmall.sequenceNumber(), tooSmall.subSequenceNumber()); fail("You shouldn't be able to prepare a checkpoint earlier than the initial checkpoint."); } catch (IllegalArgumentException e) { } try { processingCheckpointer.checkpoint(tooSmall.sequenceNumber(), tooSmall.subSequenceNumber()); fail("You shouldn't be able to checkpoint earlier than the initial checkpoint."); } catch (IllegalArgumentException e) { } processingCheckpointer.checkpoint(firstSequenceNumber.sequenceNumber(), firstSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(firstSequenceNumber)); PreparedCheckpointer doesNothingPreparedCheckpoint = processingCheckpointer.prepareCheckpoint(firstSequenceNumber.sequenceNumber(), firstSequenceNumber.subSequenceNumber()); assertThat(doesNothingPreparedCheckpoint instanceof DoesNothingPreparedCheckpointer, equalTo(true)); assertThat(doesNothingPreparedCheckpoint.pendingCheckpoint(), equalTo(firstSequenceNumber)); assertThat(checkpoint.getCheckpoint(shardId), equalTo(firstSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(firstSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); doesNothingPreparedCheckpoint.checkpoint(); assertThat(checkpoint.getCheckpoint(shardId), equalTo(firstSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(firstSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); processingCheckpointer.prepareCheckpoint(secondSequenceNumber.sequenceNumber(), secondSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(secondSequenceNumber)); processingCheckpointer.checkpoint(secondSequenceNumber.sequenceNumber(), secondSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(secondSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); ExtendedSequenceNumber[] valuesWeShouldNotBeAbleToCheckpointAt = { tooSmall, firstSequenceNumber, tooBigSequenceNumber, lastSequenceNumberOfShard, null, new ExtendedSequenceNumber("bogus-checkpoint-value"), ExtendedSequenceNumber.SHARD_END, ExtendedSequenceNumber.TRIM_HORIZON, ExtendedSequenceNumber.LATEST }; for (ExtendedSequenceNumber badCheckpointValue : valuesWeShouldNotBeAbleToCheckpointAt) { try { processingCheckpointer.prepareCheckpoint(badCheckpointValue.sequenceNumber(), badCheckpointValue.subSequenceNumber()); fail("checkpointing at bad or out of order sequence didn't throw exception"); } catch (IllegalArgumentException e) { } catch (NullPointerException e) { } assertThat("Checkpoint value should not have changed", checkpoint.getCheckpoint(shardId), equalTo(secondSequenceNumber)); assertThat("Last checkpoint value should not have changed", processingCheckpointer.lastCheckpointValue(), equalTo(secondSequenceNumber)); assertThat("Largest sequence number should not have changed", processingCheckpointer.largestPermittedCheckpointValue(), equalTo(thirdSequenceNumber)); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); } processingCheckpointer.prepareCheckpoint(thirdSequenceNumber.sequenceNumber(), thirdSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(thirdSequenceNumber)); processingCheckpointer.checkpoint(thirdSequenceNumber.sequenceNumber(), thirdSequenceNumber.subSequenceNumber()); assertThat(checkpoint.getCheckpoint(shardId), equalTo(thirdSequenceNumber)); processingCheckpointer.largestPermittedCheckpointValue(lastSequenceNumberOfShard); processingCheckpointer.sequenceNumberAtShardEnd(processingCheckpointer.largestPermittedCheckpointValue()); processingCheckpointer.largestPermittedCheckpointValue(ExtendedSequenceNumber.SHARD_END); processingCheckpointer.prepareCheckpoint(lastSequenceNumberOfShard.sequenceNumber(), lastSequenceNumberOfShard.subSequenceNumber()); assertThat( "Preparing a checkpoing at the sequence number at the end of a shard should be the same as preparing a checkpoint at SHARD_END", checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), equalTo(ExtendedSequenceNumber.SHARD_END)); }
[ "@", "Test", "public", "final", "void", "testClientSpecifiedTwoPhaseCheckpoint", "(", ")", "throws", "Exception", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "ExtendedSequenceNumber", "tooSmall", "=", "new", "ExtendedSequenceNumber", "(", "\"2\"", ")", ";", "ExtendedSequenceNumber", "firstSequenceNumber", "=", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ";", "ExtendedSequenceNumber", "secondSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"127\"", ")", ";", "ExtendedSequenceNumber", "thirdSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"5019\"", ")", ";", "ExtendedSequenceNumber", "lastSequenceNumberOfShard", "=", "new", "ExtendedSequenceNumber", "(", "\"6789\"", ")", ";", "ExtendedSequenceNumber", "tooBigSequenceNumber", "=", "new", "ExtendedSequenceNumber", "(", "\"9000\"", ")", ";", "processingCheckpointer", ".", "setInitialCheckpointValue", "(", "firstSequenceNumber", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "thirdSequenceNumber", ")", ";", "try", "{", "processingCheckpointer", ".", "prepareCheckpoint", "(", "tooSmall", ".", "sequenceNumber", "(", ")", ",", "tooSmall", ".", "subSequenceNumber", "(", ")", ")", ";", "fail", "(", "\"You shouldn't be able to prepare a checkpoint earlier than the initial checkpoint.\"", ")", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "}", "try", "{", "processingCheckpointer", ".", "checkpoint", "(", "tooSmall", ".", "sequenceNumber", "(", ")", ",", "tooSmall", ".", "subSequenceNumber", "(", ")", ")", ";", "fail", "(", "\"You shouldn't be able to checkpoint earlier than the initial checkpoint.\"", ")", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "}", "processingCheckpointer", ".", "checkpoint", "(", "firstSequenceNumber", ".", "sequenceNumber", "(", ")", ",", "firstSequenceNumber", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "firstSequenceNumber", ")", ")", ";", "PreparedCheckpointer", "doesNothingPreparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", "firstSequenceNumber", ".", "sequenceNumber", "(", ")", ",", "firstSequenceNumber", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "doesNothingPreparedCheckpoint", "instanceof", "DoesNothingPreparedCheckpointer", ",", "equalTo", "(", "true", ")", ")", ";", "assertThat", "(", "doesNothingPreparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "firstSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "firstSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "firstSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "doesNothingPreparedCheckpoint", ".", "checkpoint", "(", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "firstSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "firstSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "processingCheckpointer", ".", "prepareCheckpoint", "(", "secondSequenceNumber", ".", "sequenceNumber", "(", ")", ",", "secondSequenceNumber", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "secondSequenceNumber", ")", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", "secondSequenceNumber", ".", "sequenceNumber", "(", ")", ",", "secondSequenceNumber", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "secondSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "ExtendedSequenceNumber", "[", "]", "valuesWeShouldNotBeAbleToCheckpointAt", "=", "{", "tooSmall", ",", "firstSequenceNumber", ",", "tooBigSequenceNumber", ",", "lastSequenceNumberOfShard", ",", "null", ",", "new", "ExtendedSequenceNumber", "(", "\"bogus-checkpoint-value\"", ")", ",", "ExtendedSequenceNumber", ".", "SHARD_END", ",", "ExtendedSequenceNumber", ".", "TRIM_HORIZON", ",", "ExtendedSequenceNumber", ".", "LATEST", "}", ";", "for", "(", "ExtendedSequenceNumber", "badCheckpointValue", ":", "valuesWeShouldNotBeAbleToCheckpointAt", ")", "{", "try", "{", "processingCheckpointer", ".", "prepareCheckpoint", "(", "badCheckpointValue", ".", "sequenceNumber", "(", ")", ",", "badCheckpointValue", ".", "subSequenceNumber", "(", ")", ")", ";", "fail", "(", "\"checkpointing at bad or out of order sequence didn't throw exception\"", ")", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "}", "catch", "(", "NullPointerException", "e", ")", "{", "}", "assertThat", "(", "\"Checkpoint value should not have changed\"", ",", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "secondSequenceNumber", ")", ")", ";", "assertThat", "(", "\"Last checkpoint value should not have changed\"", ",", "processingCheckpointer", ".", "lastCheckpointValue", "(", ")", ",", "equalTo", "(", "secondSequenceNumber", ")", ")", ";", "assertThat", "(", "\"Largest sequence number should not have changed\"", ",", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", ")", ",", "equalTo", "(", "thirdSequenceNumber", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "}", "processingCheckpointer", ".", "prepareCheckpoint", "(", "thirdSequenceNumber", ".", "sequenceNumber", "(", ")", ",", "thirdSequenceNumber", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "thirdSequenceNumber", ")", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", "thirdSequenceNumber", ".", "sequenceNumber", "(", ")", ",", "thirdSequenceNumber", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "thirdSequenceNumber", ")", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "lastSequenceNumberOfShard", ")", ";", "processingCheckpointer", ".", "sequenceNumberAtShardEnd", "(", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", ")", ")", ";", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "ExtendedSequenceNumber", ".", "SHARD_END", ")", ";", "processingCheckpointer", ".", "prepareCheckpoint", "(", "lastSequenceNumberOfShard", ".", "sequenceNumber", "(", ")", ",", "lastSequenceNumberOfShard", ".", "subSequenceNumber", "(", ")", ")", ";", "assertThat", "(", "\"Preparing a checkpoing at the sequence number at the end of a shard should be the same as preparing a checkpoint at SHARD_END\"", ",", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "equalTo", "(", "ExtendedSequenceNumber", ".", "SHARD_END", ")", ")", ";", "}" ]
This test is a mixed test of checking some basic functionality of two phase checkpointing at a sequence number and making sure certain bounds checks and validations are being performed inside the checkpointer to prevent clients from checkpointing out of order/too big/non-numeric values that aren't valid strings for them to be checkpointing
[ "This", "test", "is", "a", "mixed", "test", "of", "checking", "some", "basic", "functionality", "of", "two", "phase", "checkpointing", "at", "a", "sequence", "number", "and", "making", "sure", "certain", "bounds", "checks", "and", "validations", "are", "being", "performed", "inside", "the", "checkpointer", "to", "prevent", "clients", "from", "checkpointing", "out", "of", "order", "/", "too", "big", "/", "non", "-", "numeric", "values", "that", "aren", "'", "t", "valid", "strings", "for", "them", "to", "be", "checkpointing" ]
[ "// Several checkpoints we're gonna hit", "// 13", "// confirm that we cannot move backward", "// yay!", "// yay!", "// advance to first", "// prepare checkpoint at initial checkpoint value", "// nothing happens after checkpointing a doesNothingPreparedCheckpoint", "// advance to second", "// Shouldn't be able to move before the first value we ever checkpointed", "// Shouldn't even be able to move back to a once used sequence number", "// Can't exceed the max sequence number in the checkpointer", "// Just another big value that we will use later", "// Not a valid sequence number", "// Can't checkpoint at non-numeric string", "// Can't go to the end unless it is set as the max", "// Can't go back to an initial sentinel value", "// Can't go back to an initial sentinel value", "// advance to third number", "// Testing a feature that prevents checkpointing at SHARD_END twice" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 727, 918, 1842, 1227, 17068, 11710, 11406, 14431, 1435, 1216, 1185, 288, 203, 3639, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 203, 3639, 368, 3265, 502, 287, 26402, 732, 4565, 314, 265, 6582, 6800, 203, 3639, 14094, 21047, 4885, 19187, 273, 394, 14094, 21047, 2932, 22, 8863, 203, 3639, 14094, 21047, 1122, 21047, 273, 9776, 18, 588, 14431, 12, 22630, 548, 1769, 368, 5958, 203, 3639, 14094, 21047, 2205, 21047, 273, 394, 14094, 21047, 2932, 14260, 8863, 203, 3639, 14094, 21047, 12126, 21047, 273, 394, 14094, 21047, 2932, 9172, 29, 8863, 203, 3639, 14094, 21047, 1142, 4021, 9226, 8428, 273, 394, 14094, 21047, 2932, 9599, 6675, 8863, 203, 3639, 14094, 21047, 4885, 9901, 21047, 273, 394, 14094, 21047, 2932, 29, 3784, 8863, 203, 203, 3639, 4929, 1564, 10437, 18, 542, 4435, 14431, 620, 12, 3645, 21047, 1769, 203, 3639, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 451, 6909, 21047, 1769, 203, 203, 3639, 368, 6932, 716, 732, 2780, 3635, 12555, 203, 3639, 775, 288, 203, 5411, 4929, 1564, 10437, 18, 9366, 14431, 12, 16431, 19187, 18, 6178, 1854, 9334, 4885, 19187, 18, 1717, 21047, 10663, 203, 5411, 2321, 2932, 6225, 12044, 1404, 506, 7752, 358, 2911, 279, 9776, 13805, 2353, 326, 2172, 9776, 1199, 1769, 203, 3639, 289, 1044, 261, 31237, 425, 13, 288, 203, 5411, 368, 677, 528, 5, 203, 3639, 289, 203, 203, 3639, 775, 288, 203, 5411, 4929, 1564, 10437, 18, 25414, 12, 16431, 19187, 18, 6178, 1854, 9334, 4885, 19187, 18, 1717, 21047, 10663, 203, 5411, 2321, 2932, 6225, 12044, 1404, 506, 7752, 358, 9776, 13805, 2353, 326, 2172, 9776, 1199, 1769, 203, 3639, 289, 1044, 261, 31237, 425, 13, 288, 203, 5411, 368, 677, 528, 5, 203, 3639, 289, 203, 203, 3639, 368, 8312, 358, 1122, 203, 3639, 4929, 1564, 10437, 18, 25414, 12, 3645, 21047, 18, 6178, 1854, 9334, 1122, 21047, 18, 1717, 21047, 10663, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 3645, 21047, 10019, 203, 203, 3639, 368, 2911, 9776, 622, 2172, 9776, 460, 203, 3639, 13893, 1564, 10437, 1552, 23814, 15464, 14431, 273, 203, 7734, 4929, 1564, 10437, 18, 9366, 14431, 12, 3645, 21047, 18, 6178, 1854, 9334, 1122, 21047, 18, 1717, 21047, 10663, 203, 3639, 1815, 18163, 12, 20657, 23814, 15464, 14431, 1276, 9637, 23814, 15464, 1564, 10437, 16, 3959, 774, 12, 3767, 10019, 203, 3639, 1815, 18163, 12, 20657, 23814, 15464, 14431, 18, 9561, 14431, 9334, 3959, 774, 12, 3645, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 12, 22630, 548, 3631, 3959, 774, 12, 3645, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 25414, 9334, 3959, 774, 12, 3645, 21047, 10019, 203, 3639, 1815, 18163, 12, 25414, 18, 588, 14431, 921, 12, 22630, 548, 2934, 9561, 14431, 9334, 446, 620, 10663, 203, 203, 3639, 368, 5083, 10555, 1839, 9776, 310, 279, 1552, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 20308, 203, 377, 380, 1220, 1842, 353, 279, 7826, 1842, 434, 6728, 2690, 5337, 14176, 434, 2795, 6855, 9776, 310, 622, 279, 3102, 1300, 203, 377, 380, 471, 10480, 3071, 8626, 4972, 4271, 471, 20808, 854, 3832, 9591, 4832, 326, 866, 10437, 358, 5309, 203, 377, 380, 7712, 628, 9776, 310, 596, 434, 1353, 19, 16431, 5446, 19, 5836, 17, 5246, 924, 716, 11526, 1404, 923, 2064, 364, 2182, 358, 506, 203, 377, 380, 9776, 310, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testMixedCheckpointCalls
null
@SuppressWarnings("serial") @Test public final void testMixedCheckpointCalls() throws Exception { for (LinkedHashMap<String, CheckpointAction> testPlan : getMixedCallsTestPlan()) { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); testMixedCheckpointCalls(processingCheckpointer, testPlan, CheckpointerType.CHECKPOINTER); } }
/** * Tests a bunch of mixed calls between checkpoint() and checkpoint(sequenceNumber) using a helper function. * * Also covers an edge case scenario where a shard consumer is started on a shard that never receives any records * and is then shutdown * * @throws Exception */
Tests a bunch of mixed calls between checkpoint() and checkpoint(sequenceNumber) using a helper function. Also covers an edge case scenario where a shard consumer is started on a shard that never receives any records and is then shutdown @throws Exception
[ "Tests", "a", "bunch", "of", "mixed", "calls", "between", "checkpoint", "()", "and", "checkpoint", "(", "sequenceNumber", ")", "using", "a", "helper", "function", ".", "Also", "covers", "an", "edge", "case", "scenario", "where", "a", "shard", "consumer", "is", "started", "on", "a", "shard", "that", "never", "receives", "any", "records", "and", "is", "then", "shutdown", "@throws", "Exception" ]
@SuppressWarnings("serial") @Test public final void testMixedCheckpointCalls() throws Exception { for (LinkedHashMap<String, CheckpointAction> testPlan : getMixedCallsTestPlan()) { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); testMixedCheckpointCalls(processingCheckpointer, testPlan, CheckpointerType.CHECKPOINTER); } }
[ "@", "SuppressWarnings", "(", "\"serial\"", ")", "@", "Test", "public", "final", "void", "testMixedCheckpointCalls", "(", ")", "throws", "Exception", "{", "for", "(", "LinkedHashMap", "<", "String", ",", "CheckpointAction", ">", "testPlan", ":", "getMixedCallsTestPlan", "(", ")", ")", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "testMixedCheckpointCalls", "(", "processingCheckpointer", ",", "testPlan", ",", "CheckpointerType", ".", "CHECKPOINTER", ")", ";", "}", "}" ]
Tests a bunch of mixed calls between checkpoint() and checkpoint(sequenceNumber) using a helper function.
[ "Tests", "a", "bunch", "of", "mixed", "calls", "between", "checkpoint", "()", "and", "checkpoint", "(", "sequenceNumber", ")", "using", "a", "helper", "function", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 8818, 7923, 203, 565, 632, 4709, 203, 565, 1071, 727, 918, 1842, 19846, 14431, 10125, 1435, 1216, 1185, 288, 203, 3639, 364, 261, 13174, 8658, 32, 780, 16, 25569, 1803, 34, 1842, 5365, 294, 2108, 3960, 10125, 4709, 5365, 10756, 288, 203, 5411, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 5411, 1842, 19846, 14431, 10125, 12, 10632, 1564, 10437, 16, 1842, 5365, 16, 2073, 10437, 559, 18, 10687, 2419, 9125, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 87, 279, 25606, 434, 7826, 4097, 3086, 9776, 1435, 471, 9776, 12, 6178, 1854, 13, 1450, 279, 4222, 445, 18, 203, 377, 380, 203, 377, 380, 8080, 25559, 392, 3591, 648, 10766, 1625, 279, 5820, 4765, 353, 5746, 603, 279, 5820, 716, 5903, 17024, 1281, 3853, 203, 377, 380, 471, 353, 1508, 5731, 203, 377, 380, 203, 377, 380, 632, 15069, 1185, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testMixedTwoPhaseCheckpointCalls
null
@SuppressWarnings("serial") @Test public final void testMixedTwoPhaseCheckpointCalls() throws Exception { for (LinkedHashMap<String, CheckpointAction> testPlan : getMixedCallsTestPlan()) { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); testMixedCheckpointCalls(processingCheckpointer, testPlan, CheckpointerType.PREPARED_CHECKPOINTER); } }
/** * similar to * {@link ShardShardRecordProcessorCheckpointerTest#testMixedCheckpointCalls()} , * but executes in two phase commit mode, where we prepare a checkpoint and then commit the prepared checkpoint * * @throws Exception */
similar to ShardShardRecordProcessorCheckpointerTest#testMixedCheckpointCalls() , but executes in two phase commit mode, where we prepare a checkpoint and then commit the prepared checkpoint @throws Exception
[ "similar", "to", "ShardShardRecordProcessorCheckpointerTest#testMixedCheckpointCalls", "()", "but", "executes", "in", "two", "phase", "commit", "mode", "where", "we", "prepare", "a", "checkpoint", "and", "then", "commit", "the", "prepared", "checkpoint", "@throws", "Exception" ]
@SuppressWarnings("serial") @Test public final void testMixedTwoPhaseCheckpointCalls() throws Exception { for (LinkedHashMap<String, CheckpointAction> testPlan : getMixedCallsTestPlan()) { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); testMixedCheckpointCalls(processingCheckpointer, testPlan, CheckpointerType.PREPARED_CHECKPOINTER); } }
[ "@", "SuppressWarnings", "(", "\"serial\"", ")", "@", "Test", "public", "final", "void", "testMixedTwoPhaseCheckpointCalls", "(", ")", "throws", "Exception", "{", "for", "(", "LinkedHashMap", "<", "String", ",", "CheckpointAction", ">", "testPlan", ":", "getMixedCallsTestPlan", "(", ")", ")", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "testMixedCheckpointCalls", "(", "processingCheckpointer", ",", "testPlan", ",", "CheckpointerType", ".", "PREPARED_CHECKPOINTER", ")", ";", "}", "}" ]
similar to {@link ShardShardRecordProcessorCheckpointerTest#testMixedCheckpointCalls()} , but executes in two phase commit mode, where we prepare a checkpoint and then commit the prepared checkpoint
[ "similar", "to", "{", "@link", "ShardShardRecordProcessorCheckpointerTest#testMixedCheckpointCalls", "()", "}", "but", "executes", "in", "two", "phase", "commit", "mode", "where", "we", "prepare", "a", "checkpoint", "and", "then", "commit", "the", "prepared", "checkpoint" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 8818, 7923, 203, 565, 632, 4709, 203, 565, 1071, 727, 918, 1842, 19846, 11710, 11406, 14431, 10125, 1435, 1216, 1185, 288, 203, 3639, 364, 261, 13174, 8658, 32, 780, 16, 25569, 1803, 34, 1842, 5365, 294, 2108, 3960, 10125, 4709, 5365, 10756, 288, 203, 5411, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 5411, 1842, 19846, 14431, 10125, 12, 10632, 1564, 10437, 16, 1842, 5365, 16, 2073, 10437, 559, 18, 3670, 4066, 5879, 67, 10687, 2419, 9125, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7281, 358, 203, 377, 380, 8901, 1232, 16490, 8428, 2115, 5164, 1564, 10437, 4709, 7, 3813, 19846, 14431, 10125, 17767, 269, 203, 377, 380, 1496, 11997, 316, 2795, 6855, 3294, 1965, 16, 1625, 732, 2911, 279, 9776, 471, 1508, 3294, 326, 8208, 9776, 203, 377, 380, 203, 377, 380, 632, 15069, 1185, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testMixedTwoPhaseCheckpointCalls2
null
@SuppressWarnings("serial") @Test public final void testMixedTwoPhaseCheckpointCalls2() throws Exception { for (LinkedHashMap<String, CheckpointAction> testPlan : getMixedCallsTestPlan()) { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); testMixedCheckpointCalls(processingCheckpointer, testPlan, CheckpointerType.PREPARE_THEN_CHECKPOINTER); } }
/** * similar to * {@link ShardShardRecordProcessorCheckpointerTest#testMixedCheckpointCalls()} , * but executes in two phase commit mode, where we prepare a checkpoint, but we checkpoint using the * RecordProcessorCheckpointer instead of the returned PreparedCheckpointer * * @throws Exception */
similar to ShardShardRecordProcessorCheckpointerTest#testMixedCheckpointCalls() , but executes in two phase commit mode, where we prepare a checkpoint, but we checkpoint using the RecordProcessorCheckpointer instead of the returned PreparedCheckpointer @throws Exception
[ "similar", "to", "ShardShardRecordProcessorCheckpointerTest#testMixedCheckpointCalls", "()", "but", "executes", "in", "two", "phase", "commit", "mode", "where", "we", "prepare", "a", "checkpoint", "but", "we", "checkpoint", "using", "the", "RecordProcessorCheckpointer", "instead", "of", "the", "returned", "PreparedCheckpointer", "@throws", "Exception" ]
@SuppressWarnings("serial") @Test public final void testMixedTwoPhaseCheckpointCalls2() throws Exception { for (LinkedHashMap<String, CheckpointAction> testPlan : getMixedCallsTestPlan()) { ShardRecordProcessorCheckpointer processingCheckpointer = new ShardRecordProcessorCheckpointer(shardInfo, checkpoint); testMixedCheckpointCalls(processingCheckpointer, testPlan, CheckpointerType.PREPARE_THEN_CHECKPOINTER); } }
[ "@", "SuppressWarnings", "(", "\"serial\"", ")", "@", "Test", "public", "final", "void", "testMixedTwoPhaseCheckpointCalls2", "(", ")", "throws", "Exception", "{", "for", "(", "LinkedHashMap", "<", "String", ",", "CheckpointAction", ">", "testPlan", ":", "getMixedCallsTestPlan", "(", ")", ")", "{", "ShardRecordProcessorCheckpointer", "processingCheckpointer", "=", "new", "ShardRecordProcessorCheckpointer", "(", "shardInfo", ",", "checkpoint", ")", ";", "testMixedCheckpointCalls", "(", "processingCheckpointer", ",", "testPlan", ",", "CheckpointerType", ".", "PREPARE_THEN_CHECKPOINTER", ")", ";", "}", "}" ]
similar to {@link ShardShardRecordProcessorCheckpointerTest#testMixedCheckpointCalls()} , but executes in two phase commit mode, where we prepare a checkpoint, but we checkpoint using the RecordProcessorCheckpointer instead of the returned PreparedCheckpointer
[ "similar", "to", "{", "@link", "ShardShardRecordProcessorCheckpointerTest#testMixedCheckpointCalls", "()", "}", "but", "executes", "in", "two", "phase", "commit", "mode", "where", "we", "prepare", "a", "checkpoint", "but", "we", "checkpoint", "using", "the", "RecordProcessorCheckpointer", "instead", "of", "the", "returned", "PreparedCheckpointer" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 8818, 7923, 203, 565, 632, 4709, 203, 565, 1071, 727, 918, 1842, 19846, 11710, 11406, 14431, 10125, 22, 1435, 1216, 1185, 288, 203, 3639, 364, 261, 13174, 8658, 32, 780, 16, 25569, 1803, 34, 1842, 5365, 294, 2108, 3960, 10125, 4709, 5365, 10756, 288, 203, 5411, 16490, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 273, 394, 16490, 2115, 5164, 1564, 10437, 12, 22630, 966, 16, 9776, 1769, 203, 5411, 1842, 19846, 14431, 10125, 12, 10632, 1564, 10437, 16, 1842, 5365, 16, 2073, 10437, 559, 18, 3670, 11713, 67, 2455, 1157, 67, 10687, 2419, 9125, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7281, 358, 203, 377, 380, 8901, 1232, 16490, 8428, 2115, 5164, 1564, 10437, 4709, 7, 3813, 19846, 14431, 10125, 17767, 269, 203, 377, 380, 1496, 11997, 316, 2795, 6855, 3294, 1965, 16, 1625, 732, 2911, 279, 9776, 16, 1496, 732, 9776, 1450, 326, 203, 377, 380, 5059, 5164, 1564, 10437, 3560, 434, 326, 2106, 13893, 1564, 10437, 203, 377, 380, 203, 377, 380, 632, 15069, 1185, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2ff820041c1cc4a94e9542556eebd17efad6d630
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/checkpoint/ShardShardRecordProcessorCheckpointerTest.java
[ "Apache-2.0" ]
Java
testMixedCheckpointCalls
null
private void testMixedCheckpointCalls(ShardRecordProcessorCheckpointer processingCheckpointer, LinkedHashMap<String, CheckpointAction> checkpointValueAndAction, CheckpointerType checkpointerType) throws Exception { for (Entry<String, CheckpointAction> entry : checkpointValueAndAction.entrySet()) { PreparedCheckpointer preparedCheckpoint = null; ExtendedSequenceNumber lastCheckpointValue = processingCheckpointer.lastCheckpointValue(); if (SentinelCheckpoint.SHARD_END.toString().equals(entry.getKey())) { // Before shard end, we will pretend to do what we expect the shutdown task to do processingCheckpointer.sequenceNumberAtShardEnd(processingCheckpointer .largestPermittedCheckpointValue()); } // Advance the largest checkpoint and check that it is updated. processingCheckpointer.largestPermittedCheckpointValue(new ExtendedSequenceNumber(entry.getKey())); assertThat("Expected the largest checkpoint value to be updated after setting it", processingCheckpointer.largestPermittedCheckpointValue(), equalTo(new ExtendedSequenceNumber(entry.getKey()))); switch (entry.getValue()) { case NONE: // We were told to not checkpoint, so lets just make sure the last checkpoint value is the same as // when this block started then continue to the next instruction assertThat("Expected the last checkpoint value to stay the same if we didn't checkpoint", processingCheckpointer.lastCheckpointValue(), equalTo(lastCheckpointValue)); continue; case NO_SEQUENCE_NUMBER: switch (checkpointerType) { case CHECKPOINTER: processingCheckpointer.checkpoint(); break; case PREPARED_CHECKPOINTER: preparedCheckpoint = processingCheckpointer.prepareCheckpoint(); preparedCheckpoint.checkpoint(); case PREPARE_THEN_CHECKPOINTER: preparedCheckpoint = processingCheckpointer.prepareCheckpoint(); processingCheckpointer.checkpoint( preparedCheckpoint.pendingCheckpoint().sequenceNumber(), preparedCheckpoint.pendingCheckpoint().subSequenceNumber()); } break; case WITH_SEQUENCE_NUMBER: switch (checkpointerType) { case CHECKPOINTER: processingCheckpointer.checkpoint(entry.getKey()); break; case PREPARED_CHECKPOINTER: preparedCheckpoint = processingCheckpointer.prepareCheckpoint(entry.getKey()); preparedCheckpoint.checkpoint(); case PREPARE_THEN_CHECKPOINTER: preparedCheckpoint = processingCheckpointer.prepareCheckpoint(entry.getKey()); processingCheckpointer.checkpoint( preparedCheckpoint.pendingCheckpoint().sequenceNumber(), preparedCheckpoint.pendingCheckpoint().subSequenceNumber()); } break; } // We must have checkpointed to get here, so let's make sure our last checkpoint value is up to date assertThat("Expected the last checkpoint value to change after checkpointing", processingCheckpointer.lastCheckpointValue(), equalTo(new ExtendedSequenceNumber(entry.getKey()))); assertThat("Expected the largest checkpoint value to remain the same since the last set", processingCheckpointer.largestPermittedCheckpointValue(), equalTo(new ExtendedSequenceNumber(entry.getKey()))); assertThat(checkpoint.getCheckpoint(shardId), equalTo(new ExtendedSequenceNumber(entry.getKey()))); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(new ExtendedSequenceNumber(entry.getKey()))); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); } }
/** * A utility function to simplify various sequences of intermixed updates to the checkpointer, and calls to * checpoint() and checkpoint(sequenceNumber). Takes a map where the key is a new sequence number to set in the * checkpointer and the value is a CheckpointAction indicating an action to take: NONE -> Set the sequence number, * don't do anything else NO_SEQUENCE_NUMBER -> Set the sequence number and call checkpoint() WITH_SEQUENCE_NUMBER * -> Set the sequence number and call checkpoint(sequenceNumber) with that sequence number * * @param processingCheckpointer * @param checkpointValueAndAction * A map describing which checkpoint value to set in the checkpointer, and what action to take * @throws Exception */
A utility function to simplify various sequences of intermixed updates to the checkpointer, and calls to checpoint() and checkpoint(sequenceNumber). Takes a map where the key is a new sequence number to set in the checkpointer and the value is a CheckpointAction indicating an action to take: NONE -> Set the sequence number, don't do anything else NO_SEQUENCE_NUMBER -> Set the sequence number and call checkpoint() WITH_SEQUENCE_NUMBER -> Set the sequence number and call checkpoint(sequenceNumber) with that sequence number @param processingCheckpointer @param checkpointValueAndAction A map describing which checkpoint value to set in the checkpointer, and what action to take @throws Exception
[ "A", "utility", "function", "to", "simplify", "various", "sequences", "of", "intermixed", "updates", "to", "the", "checkpointer", "and", "calls", "to", "checpoint", "()", "and", "checkpoint", "(", "sequenceNumber", ")", ".", "Takes", "a", "map", "where", "the", "key", "is", "a", "new", "sequence", "number", "to", "set", "in", "the", "checkpointer", "and", "the", "value", "is", "a", "CheckpointAction", "indicating", "an", "action", "to", "take", ":", "NONE", "-", ">", "Set", "the", "sequence", "number", "don", "'", "t", "do", "anything", "else", "NO_SEQUENCE_NUMBER", "-", ">", "Set", "the", "sequence", "number", "and", "call", "checkpoint", "()", "WITH_SEQUENCE_NUMBER", "-", ">", "Set", "the", "sequence", "number", "and", "call", "checkpoint", "(", "sequenceNumber", ")", "with", "that", "sequence", "number", "@param", "processingCheckpointer", "@param", "checkpointValueAndAction", "A", "map", "describing", "which", "checkpoint", "value", "to", "set", "in", "the", "checkpointer", "and", "what", "action", "to", "take", "@throws", "Exception" ]
private void testMixedCheckpointCalls(ShardRecordProcessorCheckpointer processingCheckpointer, LinkedHashMap<String, CheckpointAction> checkpointValueAndAction, CheckpointerType checkpointerType) throws Exception { for (Entry<String, CheckpointAction> entry : checkpointValueAndAction.entrySet()) { PreparedCheckpointer preparedCheckpoint = null; ExtendedSequenceNumber lastCheckpointValue = processingCheckpointer.lastCheckpointValue(); if (SentinelCheckpoint.SHARD_END.toString().equals(entry.getKey())) { processingCheckpointer.sequenceNumberAtShardEnd(processingCheckpointer .largestPermittedCheckpointValue()); } processingCheckpointer.largestPermittedCheckpointValue(new ExtendedSequenceNumber(entry.getKey())); assertThat("Expected the largest checkpoint value to be updated after setting it", processingCheckpointer.largestPermittedCheckpointValue(), equalTo(new ExtendedSequenceNumber(entry.getKey()))); switch (entry.getValue()) { case NONE: assertThat("Expected the last checkpoint value to stay the same if we didn't checkpoint", processingCheckpointer.lastCheckpointValue(), equalTo(lastCheckpointValue)); continue; case NO_SEQUENCE_NUMBER: switch (checkpointerType) { case CHECKPOINTER: processingCheckpointer.checkpoint(); break; case PREPARED_CHECKPOINTER: preparedCheckpoint = processingCheckpointer.prepareCheckpoint(); preparedCheckpoint.checkpoint(); case PREPARE_THEN_CHECKPOINTER: preparedCheckpoint = processingCheckpointer.prepareCheckpoint(); processingCheckpointer.checkpoint( preparedCheckpoint.pendingCheckpoint().sequenceNumber(), preparedCheckpoint.pendingCheckpoint().subSequenceNumber()); } break; case WITH_SEQUENCE_NUMBER: switch (checkpointerType) { case CHECKPOINTER: processingCheckpointer.checkpoint(entry.getKey()); break; case PREPARED_CHECKPOINTER: preparedCheckpoint = processingCheckpointer.prepareCheckpoint(entry.getKey()); preparedCheckpoint.checkpoint(); case PREPARE_THEN_CHECKPOINTER: preparedCheckpoint = processingCheckpointer.prepareCheckpoint(entry.getKey()); processingCheckpointer.checkpoint( preparedCheckpoint.pendingCheckpoint().sequenceNumber(), preparedCheckpoint.pendingCheckpoint().subSequenceNumber()); } break; } assertThat("Expected the last checkpoint value to change after checkpointing", processingCheckpointer.lastCheckpointValue(), equalTo(new ExtendedSequenceNumber(entry.getKey()))); assertThat("Expected the largest checkpoint value to remain the same since the last set", processingCheckpointer.largestPermittedCheckpointValue(), equalTo(new ExtendedSequenceNumber(entry.getKey()))); assertThat(checkpoint.getCheckpoint(shardId), equalTo(new ExtendedSequenceNumber(entry.getKey()))); assertThat(checkpoint.getCheckpointObject(shardId).checkpoint(), equalTo(new ExtendedSequenceNumber(entry.getKey()))); assertThat(checkpoint.getCheckpointObject(shardId).pendingCheckpoint(), nullValue()); } }
[ "private", "void", "testMixedCheckpointCalls", "(", "ShardRecordProcessorCheckpointer", "processingCheckpointer", ",", "LinkedHashMap", "<", "String", ",", "CheckpointAction", ">", "checkpointValueAndAction", ",", "CheckpointerType", "checkpointerType", ")", "throws", "Exception", "{", "for", "(", "Entry", "<", "String", ",", "CheckpointAction", ">", "entry", ":", "checkpointValueAndAction", ".", "entrySet", "(", ")", ")", "{", "PreparedCheckpointer", "preparedCheckpoint", "=", "null", ";", "ExtendedSequenceNumber", "lastCheckpointValue", "=", "processingCheckpointer", ".", "lastCheckpointValue", "(", ")", ";", "if", "(", "SentinelCheckpoint", ".", "SHARD_END", ".", "toString", "(", ")", ".", "equals", "(", "entry", ".", "getKey", "(", ")", ")", ")", "{", "processingCheckpointer", ".", "sequenceNumberAtShardEnd", "(", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", ")", ")", ";", "}", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", "new", "ExtendedSequenceNumber", "(", "entry", ".", "getKey", "(", ")", ")", ")", ";", "assertThat", "(", "\"Expected the largest checkpoint value to be updated after setting it\"", ",", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", ")", ",", "equalTo", "(", "new", "ExtendedSequenceNumber", "(", "entry", ".", "getKey", "(", ")", ")", ")", ")", ";", "switch", "(", "entry", ".", "getValue", "(", ")", ")", "{", "case", "NONE", ":", "assertThat", "(", "\"Expected the last checkpoint value to stay the same if we didn't checkpoint\"", ",", "processingCheckpointer", ".", "lastCheckpointValue", "(", ")", ",", "equalTo", "(", "lastCheckpointValue", ")", ")", ";", "continue", ";", "case", "NO_SEQUENCE_NUMBER", ":", "switch", "(", "checkpointerType", ")", "{", "case", "CHECKPOINTER", ":", "processingCheckpointer", ".", "checkpoint", "(", ")", ";", "break", ";", "case", "PREPARED_CHECKPOINTER", ":", "preparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", ")", ";", "preparedCheckpoint", ".", "checkpoint", "(", ")", ";", "case", "PREPARE_THEN_CHECKPOINTER", ":", "preparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", "preparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ".", "sequenceNumber", "(", ")", ",", "preparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ".", "subSequenceNumber", "(", ")", ")", ";", "}", "break", ";", "case", "WITH_SEQUENCE_NUMBER", ":", "switch", "(", "checkpointerType", ")", "{", "case", "CHECKPOINTER", ":", "processingCheckpointer", ".", "checkpoint", "(", "entry", ".", "getKey", "(", ")", ")", ";", "break", ";", "case", "PREPARED_CHECKPOINTER", ":", "preparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", "entry", ".", "getKey", "(", ")", ")", ";", "preparedCheckpoint", ".", "checkpoint", "(", ")", ";", "case", "PREPARE_THEN_CHECKPOINTER", ":", "preparedCheckpoint", "=", "processingCheckpointer", ".", "prepareCheckpoint", "(", "entry", ".", "getKey", "(", ")", ")", ";", "processingCheckpointer", ".", "checkpoint", "(", "preparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ".", "sequenceNumber", "(", ")", ",", "preparedCheckpoint", ".", "pendingCheckpoint", "(", ")", ".", "subSequenceNumber", "(", ")", ")", ";", "}", "break", ";", "}", "assertThat", "(", "\"Expected the last checkpoint value to change after checkpointing\"", ",", "processingCheckpointer", ".", "lastCheckpointValue", "(", ")", ",", "equalTo", "(", "new", "ExtendedSequenceNumber", "(", "entry", ".", "getKey", "(", ")", ")", ")", ")", ";", "assertThat", "(", "\"Expected the largest checkpoint value to remain the same since the last set\"", ",", "processingCheckpointer", ".", "largestPermittedCheckpointValue", "(", ")", ",", "equalTo", "(", "new", "ExtendedSequenceNumber", "(", "entry", ".", "getKey", "(", ")", ")", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpoint", "(", "shardId", ")", ",", "equalTo", "(", "new", "ExtendedSequenceNumber", "(", "entry", ".", "getKey", "(", ")", ")", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "checkpoint", "(", ")", ",", "equalTo", "(", "new", "ExtendedSequenceNumber", "(", "entry", ".", "getKey", "(", ")", ")", ")", ")", ";", "assertThat", "(", "checkpoint", ".", "getCheckpointObject", "(", "shardId", ")", ".", "pendingCheckpoint", "(", ")", ",", "nullValue", "(", ")", ")", ";", "}", "}" ]
A utility function to simplify various sequences of intermixed updates to the checkpointer, and calls to checpoint() and checkpoint(sequenceNumber).
[ "A", "utility", "function", "to", "simplify", "various", "sequences", "of", "intermixed", "updates", "to", "the", "checkpointer", "and", "calls", "to", "checpoint", "()", "and", "checkpoint", "(", "sequenceNumber", ")", "." ]
[ "// Before shard end, we will pretend to do what we expect the shutdown task to do", "// Advance the largest checkpoint and check that it is updated.", "// We were told to not checkpoint, so lets just make sure the last checkpoint value is the same as", "// when this block started then continue to the next instruction", "// We must have checkpointed to get here, so let's make sure our last checkpoint value is up to date" ]
[ { "param": "processingCheckpointer", "type": "ShardRecordProcessorCheckpointer" }, { "param": "checkpointValueAndAction", "type": "LinkedHashMap<String, CheckpointAction>" }, { "param": "checkpointerType", "type": "CheckpointerType" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "processingCheckpointer", "type": "ShardRecordProcessorCheckpointer", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "checkpointValueAndAction", "type": "LinkedHashMap<String, CheckpointAction>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "checkpointerType", "type": "CheckpointerType", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1842, 19846, 14431, 10125, 12, 8428, 2115, 5164, 1564, 10437, 4929, 1564, 10437, 16, 203, 5411, 13589, 32, 780, 16, 25569, 1803, 34, 9776, 620, 1876, 1803, 16, 203, 5411, 2073, 10437, 559, 866, 10437, 559, 13, 1216, 1185, 288, 203, 203, 3639, 364, 261, 1622, 32, 780, 16, 25569, 1803, 34, 1241, 294, 9776, 620, 1876, 1803, 18, 4099, 694, 10756, 288, 203, 5411, 13893, 1564, 10437, 8208, 14431, 273, 446, 31, 203, 5411, 14094, 21047, 1142, 14431, 620, 273, 4929, 1564, 10437, 18, 2722, 14431, 620, 5621, 203, 203, 5411, 309, 261, 7828, 12927, 14431, 18, 2664, 8085, 67, 4415, 18, 10492, 7675, 14963, 12, 4099, 18, 588, 653, 1435, 3719, 288, 203, 7734, 368, 11672, 5820, 679, 16, 732, 903, 675, 17445, 358, 741, 4121, 732, 4489, 326, 5731, 1562, 358, 741, 203, 7734, 4929, 1564, 10437, 18, 6178, 1854, 861, 8428, 1638, 12, 10632, 1564, 10437, 203, 13491, 263, 80, 11475, 31465, 14431, 620, 10663, 203, 5411, 289, 203, 5411, 368, 4052, 5882, 326, 12756, 9776, 471, 866, 716, 518, 353, 3526, 18, 203, 5411, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 12, 2704, 14094, 21047, 12, 4099, 18, 588, 653, 1435, 10019, 203, 5411, 1815, 18163, 2932, 6861, 326, 12756, 9776, 460, 358, 506, 3526, 1839, 3637, 518, 3113, 203, 10792, 4929, 1564, 10437, 18, 80, 11475, 31465, 14431, 620, 9334, 203, 10792, 3959, 774, 12, 2704, 14094, 21047, 12, 4099, 18, 588, 653, 1435, 3719, 1769, 203, 5411, 1620, 261, 4099, 18, 24805, 10756, 288, 203, 5411, 648, 11829, 30, 203, 7734, 368, 1660, 4591, 268, 1673, 358, 486, 9776, 16, 1427, 14557, 2537, 1221, 3071, 326, 1142, 9776, 460, 353, 326, 1967, 487, 203, 7734, 368, 1347, 333, 1203, 5746, 1508, 1324, 358, 326, 1024, 7592, 203, 7734, 1815, 18163, 2932, 6861, 326, 1142, 9776, 460, 358, 23449, 326, 1967, 309, 732, 10242, 1404, 9776, 3113, 203, 13491, 4929, 1564, 10437, 18, 2722, 14431, 620, 9334, 3959, 774, 12, 2722, 14431, 620, 10019, 203, 7734, 1324, 31, 203, 5411, 648, 3741, 67, 25330, 67, 9931, 30, 203, 7734, 1620, 261, 1893, 10437, 559, 13, 288, 203, 10792, 648, 14565, 2419, 9125, 30, 203, 13491, 4929, 1564, 10437, 18, 25414, 5621, 203, 13491, 898, 31, 203, 10792, 648, 7071, 4066, 5879, 67, 10687, 2419, 9125, 30, 203, 13491, 8208, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 5621, 203, 13491, 8208, 14431, 18, 25414, 5621, 203, 10792, 648, 7071, 11713, 67, 2455, 1157, 67, 10687, 2419, 9125, 30, 203, 13491, 8208, 14431, 273, 4929, 1564, 10437, 18, 9366, 14431, 5621, 203, 13491, 4929, 1564, 10437, 18, 25414, 12, 203, 27573, 8208, 14431, 18, 9561, 14431, 7675, 6178, 1854, 9334, 203, 27573, 8208, 14431, 18, 9561, 14431, 7675, 1717, 21047, 10663, 203, 7734, 289, 203, 7734, 898, 31, 203, 5411, 648, 13601, 67, 25330, 67, 9931, 30, 203, 7734, 1620, 261, 1893, 10437, 559, 13, 288, 203, 10792, 648, 14565, 2419, 9125, 30, 203, 13491, 4929, 1564, 10437, 18, 25414, 12, 4099, 18, 588, 653, 10663, 203, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 377, 380, 432, 12788, 445, 358, 16499, 11191, 8463, 434, 1554, 19562, 4533, 358, 326, 866, 10437, 16, 471, 4097, 358, 203, 377, 380, 462, 557, 1153, 1435, 471, 9776, 12, 6178, 1854, 2934, 23004, 279, 852, 1625, 326, 498, 353, 279, 394, 3102, 1300, 358, 444, 316, 326, 203, 377, 380, 866, 10437, 471, 326, 460, 353, 279, 25569, 1803, 11193, 392, 1301, 358, 4862, 30, 11829, 317, 1000, 326, 3102, 1300, 16, 203, 377, 380, 2727, 1404, 741, 6967, 469, 3741, 67, 25330, 67, 9931, 317, 1000, 326, 3102, 1300, 471, 745, 9776, 1435, 13601, 67, 25330, 67, 9931, 203, 377, 380, 317, 1000, 326, 3102, 1300, 471, 745, 9776, 12, 6178, 1854, 13, 598, 716, 3102, 1300, 203, 377, 380, 203, 2 ]
7e8932cf701bba37109bb8c315a10d7ae25d1a24
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/retrieval/fanout/FanOutRecordsPublisher.java
[ "Apache-2.0" ]
Java
evictAckedEventAndScheduleNextEvent
RecordFlow
@VisibleForTesting RecordFlow evictAckedEventAndScheduleNextEvent(RecordsDeliveryAck recordsDeliveryAck) { // Peek the head of the queue on receiving the ack. // Note : This does not block wait to retrieve an element. final RecordsRetrievedContext recordsRetrievedContext = recordsDeliveryQueue.peek(); // RecordFlow of the current event that needs to be returned RecordFlow flowToBeReturned = null; final RecordsRetrieved recordsRetrieved = recordsRetrievedContext != null ? recordsRetrievedContext.getRecordsRetrieved() : null; // Check if the ack corresponds to the head of the delivery queue. if (recordsRetrieved != null && recordsRetrieved.batchUniqueIdentifier() .equals(recordsDeliveryAck.batchUniqueIdentifier())) { // It is now safe to remove the element recordsDeliveryQueue.poll(); // Take action based on the time spent by the event in queue. takeDelayedDeliveryActionIfRequired(streamAndShardId, recordsRetrievedContext.getEnqueueTimestamp(), log); // Update current sequence number for the successfully delivered event. currentSequenceNumber = ((FanoutRecordsRetrieved)recordsRetrieved).continuationSequenceNumber(); // Update the triggering flow for post scheduling upstream request. flowToBeReturned = recordsRetrievedContext.getRecordFlow(); // Try scheduling the next event in the queue or execute the subscription shutdown action. if (!recordsDeliveryQueue.isEmpty()) { recordsDeliveryQueue.peek().executeEventAction(subscriber); } } else { // Check if the mismatched event belongs to active flow. If publisher receives an ack for a // missing event in active flow, then it means the event was already acked or cleared // from the queue due to a potential bug. if (flow != null && recordsDeliveryAck.batchUniqueIdentifier().getFlowIdentifier() .equals(flow.getSubscribeToShardId())) { log.error( "{}: Received unexpected ack for the active subscription {}. Throwing. ", streamAndShardId, recordsDeliveryAck.batchUniqueIdentifier().getFlowIdentifier()); throw new IllegalStateException("Unexpected ack for the active subscription"); } // Otherwise publisher received a stale ack. else { log.info("{}: Publisher received an ack for stale subscription {}. Ignoring.", streamAndShardId, recordsDeliveryAck.batchUniqueIdentifier().getFlowIdentifier()); } } return flowToBeReturned; }
// This method is not thread-safe. You need to acquire a lock in the caller in order to execute this.
This method is not thread-safe. You need to acquire a lock in the caller in order to execute this.
[ "This", "method", "is", "not", "thread", "-", "safe", ".", "You", "need", "to", "acquire", "a", "lock", "in", "the", "caller", "in", "order", "to", "execute", "this", "." ]
@VisibleForTesting RecordFlow evictAckedEventAndScheduleNextEvent(RecordsDeliveryAck recordsDeliveryAck) { final RecordsRetrievedContext recordsRetrievedContext = recordsDeliveryQueue.peek(); RecordFlow flowToBeReturned = null; final RecordsRetrieved recordsRetrieved = recordsRetrievedContext != null ? recordsRetrievedContext.getRecordsRetrieved() : null; if (recordsRetrieved != null && recordsRetrieved.batchUniqueIdentifier() .equals(recordsDeliveryAck.batchUniqueIdentifier())) { recordsDeliveryQueue.poll(); takeDelayedDeliveryActionIfRequired(streamAndShardId, recordsRetrievedContext.getEnqueueTimestamp(), log); currentSequenceNumber = ((FanoutRecordsRetrieved)recordsRetrieved).continuationSequenceNumber(); flowToBeReturned = recordsRetrievedContext.getRecordFlow(); if (!recordsDeliveryQueue.isEmpty()) { recordsDeliveryQueue.peek().executeEventAction(subscriber); } } else { if (flow != null && recordsDeliveryAck.batchUniqueIdentifier().getFlowIdentifier() .equals(flow.getSubscribeToShardId())) { log.error( "{}: Received unexpected ack for the active subscription {}. Throwing. ", streamAndShardId, recordsDeliveryAck.batchUniqueIdentifier().getFlowIdentifier()); throw new IllegalStateException("Unexpected ack for the active subscription"); } else { log.info("{}: Publisher received an ack for stale subscription {}. Ignoring.", streamAndShardId, recordsDeliveryAck.batchUniqueIdentifier().getFlowIdentifier()); } } return flowToBeReturned; }
[ "@", "VisibleForTesting", "RecordFlow", "evictAckedEventAndScheduleNextEvent", "(", "RecordsDeliveryAck", "recordsDeliveryAck", ")", "{", "final", "RecordsRetrievedContext", "recordsRetrievedContext", "=", "recordsDeliveryQueue", ".", "peek", "(", ")", ";", "RecordFlow", "flowToBeReturned", "=", "null", ";", "final", "RecordsRetrieved", "recordsRetrieved", "=", "recordsRetrievedContext", "!=", "null", "?", "recordsRetrievedContext", ".", "getRecordsRetrieved", "(", ")", ":", "null", ";", "if", "(", "recordsRetrieved", "!=", "null", "&&", "recordsRetrieved", ".", "batchUniqueIdentifier", "(", ")", ".", "equals", "(", "recordsDeliveryAck", ".", "batchUniqueIdentifier", "(", ")", ")", ")", "{", "recordsDeliveryQueue", ".", "poll", "(", ")", ";", "takeDelayedDeliveryActionIfRequired", "(", "streamAndShardId", ",", "recordsRetrievedContext", ".", "getEnqueueTimestamp", "(", ")", ",", "log", ")", ";", "currentSequenceNumber", "=", "(", "(", "FanoutRecordsRetrieved", ")", "recordsRetrieved", ")", ".", "continuationSequenceNumber", "(", ")", ";", "flowToBeReturned", "=", "recordsRetrievedContext", ".", "getRecordFlow", "(", ")", ";", "if", "(", "!", "recordsDeliveryQueue", ".", "isEmpty", "(", ")", ")", "{", "recordsDeliveryQueue", ".", "peek", "(", ")", ".", "executeEventAction", "(", "subscriber", ")", ";", "}", "}", "else", "{", "if", "(", "flow", "!=", "null", "&&", "recordsDeliveryAck", ".", "batchUniqueIdentifier", "(", ")", ".", "getFlowIdentifier", "(", ")", ".", "equals", "(", "flow", ".", "getSubscribeToShardId", "(", ")", ")", ")", "{", "log", ".", "error", "(", "\"{}: Received unexpected ack for the active subscription {}. Throwing. \"", ",", "streamAndShardId", ",", "recordsDeliveryAck", ".", "batchUniqueIdentifier", "(", ")", ".", "getFlowIdentifier", "(", ")", ")", ";", "throw", "new", "IllegalStateException", "(", "\"Unexpected ack for the active subscription\"", ")", ";", "}", "else", "{", "log", ".", "info", "(", "\"{}: Publisher received an ack for stale subscription {}. Ignoring.\"", ",", "streamAndShardId", ",", "recordsDeliveryAck", ".", "batchUniqueIdentifier", "(", ")", ".", "getFlowIdentifier", "(", ")", ")", ";", "}", "}", "return", "flowToBeReturned", ";", "}" ]
This method is not thread-safe.
[ "This", "method", "is", "not", "thread", "-", "safe", "." ]
[ "// Peek the head of the queue on receiving the ack.", "// Note : This does not block wait to retrieve an element.", "// RecordFlow of the current event that needs to be returned", "// Check if the ack corresponds to the head of the delivery queue.", "// It is now safe to remove the element", "// Take action based on the time spent by the event in queue.", "// Update current sequence number for the successfully delivered event.", "// Update the triggering flow for post scheduling upstream request.", "// Try scheduling the next event in the queue or execute the subscription shutdown action.", "// Check if the mismatched event belongs to active flow. If publisher receives an ack for a", "// missing event in active flow, then it means the event was already acked or cleared", "// from the queue due to a potential bug.", "// Otherwise publisher received a stale ack." ]
[ { "param": "recordsDeliveryAck", "type": "RecordsDeliveryAck" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "recordsDeliveryAck", "type": "RecordsDeliveryAck", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6207, 29278, 203, 565, 5059, 5249, 18161, 11931, 329, 1133, 1876, 6061, 2134, 1133, 12, 6499, 8909, 11931, 3853, 8909, 11931, 13, 288, 203, 3639, 368, 22173, 326, 910, 434, 326, 2389, 603, 15847, 326, 8479, 18, 203, 3639, 368, 3609, 294, 1220, 1552, 486, 1203, 2529, 358, 4614, 392, 930, 18, 203, 3639, 727, 27390, 3848, 2155, 1042, 3853, 3848, 2155, 1042, 273, 3853, 8909, 3183, 18, 347, 3839, 5621, 203, 3639, 368, 5059, 5249, 434, 326, 783, 871, 716, 4260, 358, 506, 2106, 203, 3639, 5059, 5249, 4693, 15360, 22360, 273, 446, 31, 203, 203, 3639, 727, 27390, 3848, 2155, 3853, 3848, 2155, 273, 3853, 3848, 2155, 1042, 480, 446, 692, 203, 7734, 3853, 3848, 2155, 1042, 18, 588, 6499, 3848, 2155, 1435, 294, 446, 31, 203, 203, 3639, 368, 2073, 309, 326, 8479, 13955, 358, 326, 910, 434, 326, 7912, 2389, 18, 203, 3639, 309, 261, 7094, 3848, 2155, 480, 446, 597, 3853, 3848, 2155, 18, 5303, 6303, 3004, 1435, 203, 7734, 263, 14963, 12, 7094, 8909, 11931, 18, 5303, 6303, 3004, 1435, 3719, 288, 203, 5411, 368, 2597, 353, 2037, 4183, 358, 1206, 326, 930, 203, 5411, 3853, 8909, 3183, 18, 13835, 5621, 203, 5411, 368, 17129, 1301, 2511, 603, 326, 813, 26515, 635, 326, 871, 316, 2389, 18, 203, 5411, 4862, 29527, 8909, 1803, 2047, 3705, 12, 3256, 1876, 8428, 548, 16, 3853, 3848, 2155, 1042, 18, 588, 25327, 4921, 9334, 613, 1769, 203, 5411, 368, 2315, 783, 3102, 1300, 364, 326, 4985, 22112, 871, 18, 203, 5411, 783, 21047, 273, 14015, 42, 304, 659, 6499, 3848, 2155, 13, 7094, 3848, 2155, 2934, 1213, 23946, 21047, 5621, 203, 5411, 368, 2315, 326, 27411, 4693, 364, 1603, 21895, 13505, 590, 18, 203, 5411, 4693, 15360, 22360, 273, 3853, 3848, 2155, 1042, 18, 588, 2115, 5249, 5621, 203, 5411, 368, 6161, 21895, 326, 1024, 871, 316, 326, 2389, 578, 1836, 326, 4915, 5731, 1301, 18, 203, 5411, 309, 16051, 7094, 8909, 3183, 18, 291, 1921, 10756, 288, 203, 7734, 3853, 8909, 3183, 18, 347, 3839, 7675, 8837, 1133, 1803, 12, 26410, 1769, 203, 5411, 289, 203, 3639, 289, 469, 288, 203, 5411, 368, 2073, 309, 326, 7524, 11073, 871, 11081, 358, 2695, 4693, 18, 971, 12855, 17024, 392, 8479, 364, 279, 203, 5411, 368, 3315, 871, 316, 2695, 4693, 16, 1508, 518, 4696, 326, 871, 1703, 1818, 8479, 329, 578, 16054, 203, 5411, 368, 628, 326, 2389, 6541, 358, 279, 8555, 7934, 18, 203, 5411, 309, 261, 2426, 480, 446, 597, 3853, 8909, 11931, 18, 5303, 6303, 3004, 7675, 588, 5249, 3004, 1435, 203, 10792, 263, 14963, 12, 2426, 18, 588, 16352, 774, 8428, 548, 1435, 3719, 288, 203, 7734, 613, 18, 1636, 12, 203, 13491, 25287, 21066, 9733, 8479, 364, 326, 2695, 4915, 20151, 3743, 310, 18, 225, 3104, 1407, 1876, 8428, 548, 16, 3853, 8909, 11931, 18, 5303, 6303, 3004, 7675, 588, 5249, 3004, 10663, 203, 7734,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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 759, 1220, 707, 353, 486, 2650, 17, 4626, 18, 4554, 1608, 358, 10533, 279, 2176, 316, 326, 4894, 316, 1353, 358, 1836, 333, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7e8932cf701bba37109bb8c315a10d7ae25d1a24
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/retrieval/fanout/FanOutRecordsPublisher.java
[ "Apache-2.0" ]
Java
bufferCurrentEventAndScheduleIfRequired
null
@VisibleForTesting void bufferCurrentEventAndScheduleIfRequired(RecordsRetrieved recordsRetrieved, RecordFlow triggeringFlow) { final RecordsRetrievedContext recordsRetrievedContext = new RecordsRetrievedContext(Either.left(recordsRetrieved), triggeringFlow, Instant.now()); try { // Try enqueueing the RecordsRetrieved batch to the queue, which would throw exception on failure. // Note: This does not block wait to enqueue. recordsDeliveryQueue.add(recordsRetrievedContext); // If the current batch is the only element in the queue, then try scheduling the event delivery. if (recordsDeliveryQueue.size() == 1) { subscriber.onNext(recordsRetrieved); } } catch (IllegalStateException e) { log.warn("{}: Unable to enqueue the payload due to capacity restrictions in delivery queue with remaining capacity {}. Last successful request details -- {}", streamAndShardId, recordsDeliveryQueue.remainingCapacity(), lastSuccessfulRequestDetails); throw e; } catch (Throwable t) { log.error("{}: Unable to deliver event to the shard consumer.", streamAndShardId, t); throw t; } }
// This method is not thread-safe. You need to acquire a lock in the caller in order to execute this.
This method is not thread-safe. You need to acquire a lock in the caller in order to execute this.
[ "This", "method", "is", "not", "thread", "-", "safe", ".", "You", "need", "to", "acquire", "a", "lock", "in", "the", "caller", "in", "order", "to", "execute", "this", "." ]
@VisibleForTesting void bufferCurrentEventAndScheduleIfRequired(RecordsRetrieved recordsRetrieved, RecordFlow triggeringFlow) { final RecordsRetrievedContext recordsRetrievedContext = new RecordsRetrievedContext(Either.left(recordsRetrieved), triggeringFlow, Instant.now()); try { recordsDeliveryQueue.add(recordsRetrievedContext); if (recordsDeliveryQueue.size() == 1) { subscriber.onNext(recordsRetrieved); } } catch (IllegalStateException e) { log.warn("{}: Unable to enqueue the payload due to capacity restrictions in delivery queue with remaining capacity {}. Last successful request details -- {}", streamAndShardId, recordsDeliveryQueue.remainingCapacity(), lastSuccessfulRequestDetails); throw e; } catch (Throwable t) { log.error("{}: Unable to deliver event to the shard consumer.", streamAndShardId, t); throw t; } }
[ "@", "VisibleForTesting", "void", "bufferCurrentEventAndScheduleIfRequired", "(", "RecordsRetrieved", "recordsRetrieved", ",", "RecordFlow", "triggeringFlow", ")", "{", "final", "RecordsRetrievedContext", "recordsRetrievedContext", "=", "new", "RecordsRetrievedContext", "(", "Either", ".", "left", "(", "recordsRetrieved", ")", ",", "triggeringFlow", ",", "Instant", ".", "now", "(", ")", ")", ";", "try", "{", "recordsDeliveryQueue", ".", "add", "(", "recordsRetrievedContext", ")", ";", "if", "(", "recordsDeliveryQueue", ".", "size", "(", ")", "==", "1", ")", "{", "subscriber", ".", "onNext", "(", "recordsRetrieved", ")", ";", "}", "}", "catch", "(", "IllegalStateException", "e", ")", "{", "log", ".", "warn", "(", "\"{}: Unable to enqueue the payload due to capacity restrictions in delivery queue with remaining capacity {}. Last successful request details -- {}\"", ",", "streamAndShardId", ",", "recordsDeliveryQueue", ".", "remainingCapacity", "(", ")", ",", "lastSuccessfulRequestDetails", ")", ";", "throw", "e", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "log", ".", "error", "(", "\"{}: Unable to deliver event to the shard consumer.\"", ",", "streamAndShardId", ",", "t", ")", ";", "throw", "t", ";", "}", "}" ]
This method is not thread-safe.
[ "This", "method", "is", "not", "thread", "-", "safe", "." ]
[ "// Try enqueueing the RecordsRetrieved batch to the queue, which would throw exception on failure.", "// Note: This does not block wait to enqueue.", "// If the current batch is the only element in the queue, then try scheduling the event delivery." ]
[ { "param": "recordsRetrieved", "type": "RecordsRetrieved" }, { "param": "triggeringFlow", "type": "RecordFlow" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "recordsRetrieved", "type": "RecordsRetrieved", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "triggeringFlow", "type": "RecordFlow", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6207, 29278, 203, 565, 918, 1613, 3935, 1133, 1876, 6061, 2047, 3705, 12, 6499, 3848, 2155, 3853, 3848, 2155, 16, 5059, 5249, 27411, 5249, 13, 288, 203, 3639, 727, 27390, 3848, 2155, 1042, 3853, 3848, 2155, 1042, 273, 203, 7734, 394, 27390, 3848, 2155, 1042, 12, 26091, 18, 4482, 12, 7094, 3848, 2155, 3631, 27411, 5249, 16, 11190, 18, 3338, 10663, 203, 3639, 775, 288, 203, 5411, 368, 6161, 12850, 310, 326, 27390, 3848, 2155, 2581, 358, 326, 2389, 16, 1492, 4102, 604, 1520, 603, 5166, 18, 203, 5411, 368, 3609, 30, 1220, 1552, 486, 1203, 2529, 358, 12850, 18, 203, 5411, 3853, 8909, 3183, 18, 1289, 12, 7094, 3848, 2155, 1042, 1769, 203, 5411, 368, 971, 326, 783, 2581, 353, 326, 1338, 930, 316, 326, 2389, 16, 1508, 775, 21895, 326, 871, 7912, 18, 203, 5411, 309, 261, 7094, 8909, 3183, 18, 1467, 1435, 422, 404, 13, 288, 203, 7734, 9467, 18, 265, 2134, 12, 7094, 3848, 2155, 1769, 203, 5411, 289, 203, 3639, 289, 1044, 261, 12195, 5060, 425, 13, 288, 203, 203, 5411, 613, 18, 8935, 2932, 2916, 30, 18640, 358, 12850, 326, 2385, 6541, 358, 7519, 17499, 316, 7912, 2389, 598, 4463, 7519, 20151, 6825, 6873, 590, 3189, 1493, 3728, 16, 203, 10792, 1407, 1876, 8428, 548, 16, 3853, 8909, 3183, 18, 17956, 7437, 9334, 1142, 14277, 691, 3790, 1769, 203, 5411, 604, 425, 31, 203, 3639, 289, 1044, 261, 15155, 268, 13, 288, 203, 5411, 613, 18, 1636, 2932, 2916, 30, 18640, 358, 11795, 871, 358, 326, 5820, 4765, 1199, 16, 1407, 1876, 8428, 548, 16, 268, 1769, 203, 5411, 604, 268, 31, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 1220, 707, 353, 486, 2650, 17, 4626, 18, 4554, 1608, 358, 10533, 279, 2176, 316, 326, 4894, 316, 1353, 358, 1836, 333, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7e8932cf701bba37109bb8c315a10d7ae25d1a24
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/retrieval/fanout/FanOutRecordsPublisher.java
[ "Apache-2.0" ]
Java
resetRecordsDeliveryStateOnSubscriptionOnInit
null
private void resetRecordsDeliveryStateOnSubscriptionOnInit() { // Clear any lingering records in the queue. if (!recordsDeliveryQueue.isEmpty()) { log.warn("{}: Found non-empty queue while starting subscription. This indicates unsuccessful clean up of" + "previous subscription - {}. Last successful request details -- {}", streamAndShardId, subscribeToShardId, lastSuccessfulRequestDetails); recordsDeliveryQueue.clear(); } }
// This method is not thread safe. This needs to be executed after acquiring lock on this.lockObject
This method is not thread safe. This needs to be executed after acquiring lock on this.lockObject
[ "This", "method", "is", "not", "thread", "safe", ".", "This", "needs", "to", "be", "executed", "after", "acquiring", "lock", "on", "this", ".", "lockObject" ]
private void resetRecordsDeliveryStateOnSubscriptionOnInit() { if (!recordsDeliveryQueue.isEmpty()) { log.warn("{}: Found non-empty queue while starting subscription. This indicates unsuccessful clean up of" + "previous subscription - {}. Last successful request details -- {}", streamAndShardId, subscribeToShardId, lastSuccessfulRequestDetails); recordsDeliveryQueue.clear(); } }
[ "private", "void", "resetRecordsDeliveryStateOnSubscriptionOnInit", "(", ")", "{", "if", "(", "!", "recordsDeliveryQueue", ".", "isEmpty", "(", ")", ")", "{", "log", ".", "warn", "(", "\"{}: Found non-empty queue while starting subscription. This indicates unsuccessful clean up of\"", "+", "\"previous subscription - {}. Last successful request details -- {}\"", ",", "streamAndShardId", ",", "subscribeToShardId", ",", "lastSuccessfulRequestDetails", ")", ";", "recordsDeliveryQueue", ".", "clear", "(", ")", ";", "}", "}" ]
This method is not thread safe.
[ "This", "method", "is", "not", "thread", "safe", "." ]
[ "// Clear any lingering records in the queue." ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 2715, 6499, 8909, 1119, 1398, 6663, 1398, 2570, 1435, 288, 203, 3639, 368, 10121, 1281, 328, 6658, 310, 3853, 316, 326, 2389, 18, 203, 3639, 309, 16051, 7094, 8909, 3183, 18, 291, 1921, 10756, 288, 203, 5411, 613, 18, 8935, 2932, 2916, 30, 10750, 1661, 17, 5531, 2389, 1323, 5023, 4915, 18, 1220, 8527, 29411, 2721, 731, 434, 6, 203, 10792, 397, 315, 11515, 4915, 300, 20151, 6825, 6873, 590, 3189, 1493, 3728, 16, 1407, 1876, 8428, 548, 16, 9129, 774, 8428, 548, 16, 1142, 14277, 691, 3790, 1769, 203, 5411, 3853, 8909, 3183, 18, 8507, 5621, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 1220, 707, 353, 486, 2650, 4183, 18, 1220, 4260, 358, 506, 7120, 1839, 1721, 372, 11256, 2176, 603, 333, 18, 739, 921, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7e8932cf701bba37109bb8c315a10d7ae25d1a24
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/retrieval/fanout/FanOutRecordsPublisher.java
[ "Apache-2.0" ]
Java
tryEnqueueSubscriptionShutdownEvent
null
private void tryEnqueueSubscriptionShutdownEvent(SubscriptionShutdownEvent subscriptionShutdownEvent) { try { parent.recordsDeliveryQueue .add(new RecordsRetrievedContext(Either.right(subscriptionShutdownEvent), this, Instant.now())); } catch (Exception e) { log.warn( "{}: Unable to enqueue the {} shutdown event due to capacity restrictions in delivery queue with remaining capacity {}. Ignoring. Last successful request details -- {}", parent.streamAndShardId, subscriptionShutdownEvent.getEventIdentifier(), parent.recordsDeliveryQueue.remainingCapacity(), parent.lastSuccessfulRequestDetails, subscriptionShutdownEvent.getShutdownEventThrowableOptional()); } }
// This method is not thread safe. This needs to be executed after acquiring lock on parent.lockObject
This method is not thread safe. This needs to be executed after acquiring lock on parent.lockObject
[ "This", "method", "is", "not", "thread", "safe", ".", "This", "needs", "to", "be", "executed", "after", "acquiring", "lock", "on", "parent", ".", "lockObject" ]
private void tryEnqueueSubscriptionShutdownEvent(SubscriptionShutdownEvent subscriptionShutdownEvent) { try { parent.recordsDeliveryQueue .add(new RecordsRetrievedContext(Either.right(subscriptionShutdownEvent), this, Instant.now())); } catch (Exception e) { log.warn( "{}: Unable to enqueue the {} shutdown event due to capacity restrictions in delivery queue with remaining capacity {}. Ignoring. Last successful request details -- {}", parent.streamAndShardId, subscriptionShutdownEvent.getEventIdentifier(), parent.recordsDeliveryQueue.remainingCapacity(), parent.lastSuccessfulRequestDetails, subscriptionShutdownEvent.getShutdownEventThrowableOptional()); } }
[ "private", "void", "tryEnqueueSubscriptionShutdownEvent", "(", "SubscriptionShutdownEvent", "subscriptionShutdownEvent", ")", "{", "try", "{", "parent", ".", "recordsDeliveryQueue", ".", "add", "(", "new", "RecordsRetrievedContext", "(", "Either", ".", "right", "(", "subscriptionShutdownEvent", ")", ",", "this", ",", "Instant", ".", "now", "(", ")", ")", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "log", ".", "warn", "(", "\"{}: Unable to enqueue the {} shutdown event due to capacity restrictions in delivery queue with remaining capacity {}. Ignoring. Last successful request details -- {}\"", ",", "parent", ".", "streamAndShardId", ",", "subscriptionShutdownEvent", ".", "getEventIdentifier", "(", ")", ",", "parent", ".", "recordsDeliveryQueue", ".", "remainingCapacity", "(", ")", ",", "parent", ".", "lastSuccessfulRequestDetails", ",", "subscriptionShutdownEvent", ".", "getShutdownEventThrowableOptional", "(", ")", ")", ";", "}", "}" ]
This method is not thread safe.
[ "This", "method", "is", "not", "thread", "safe", "." ]
[]
[ { "param": "subscriptionShutdownEvent", "type": "SubscriptionShutdownEvent" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "subscriptionShutdownEvent", "type": "SubscriptionShutdownEvent", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 775, 25327, 6663, 10961, 1133, 12, 6663, 10961, 1133, 4915, 10961, 1133, 13, 288, 203, 5411, 775, 288, 203, 7734, 982, 18, 7094, 8909, 3183, 203, 13491, 263, 1289, 12, 2704, 27390, 3848, 2155, 1042, 12, 26091, 18, 4083, 12, 11185, 10961, 1133, 3631, 333, 16, 11190, 18, 3338, 1435, 10019, 203, 5411, 289, 1044, 261, 503, 425, 13, 288, 203, 7734, 613, 18, 8935, 12, 203, 13491, 25287, 18640, 358, 12850, 326, 2618, 5731, 871, 6541, 358, 7519, 17499, 316, 7912, 2389, 598, 4463, 7519, 20151, 467, 16997, 18, 6825, 6873, 590, 3189, 1493, 3728, 16, 203, 13491, 982, 18, 3256, 1876, 8428, 548, 16, 4915, 10961, 1133, 18, 588, 1133, 3004, 9334, 982, 18, 7094, 8909, 3183, 18, 17956, 7437, 9334, 203, 13491, 982, 18, 2722, 14277, 691, 3790, 16, 4915, 10961, 1133, 18, 588, 10961, 1133, 15155, 6542, 10663, 203, 5411, 289, 203, 3639, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 1220, 707, 353, 486, 2650, 4183, 18, 1220, 4260, 358, 506, 7120, 1839, 1721, 372, 11256, 2176, 603, 982, 18, 739, 921, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
0a48a3262231866ae63bf18e8e0df9de589368bf
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/metrics/MetricsLevel.java
[ "Apache-2.0" ]
Java
fromName
MetricsLevel
public static MetricsLevel fromName(String name) { if (name != null) { name = name.toUpperCase(); } return valueOf(name); }
/** * Returns metrics level associated with the given name. * @param name Name of the metrics level. * @return Returns metrics level associated with the given name. */
Returns metrics level associated with the given name. @param name Name of the metrics level. @return Returns metrics level associated with the given name.
[ "Returns", "metrics", "level", "associated", "with", "the", "given", "name", ".", "@param", "name", "Name", "of", "the", "metrics", "level", ".", "@return", "Returns", "metrics", "level", "associated", "with", "the", "given", "name", "." ]
public static MetricsLevel fromName(String name) { if (name != null) { name = name.toUpperCase(); } return valueOf(name); }
[ "public", "static", "MetricsLevel", "fromName", "(", "String", "name", ")", "{", "if", "(", "name", "!=", "null", ")", "{", "name", "=", "name", ".", "toUpperCase", "(", ")", ";", "}", "return", "valueOf", "(", "name", ")", ";", "}" ]
Returns metrics level associated with the given name.
[ "Returns", "metrics", "level", "associated", "with", "the", "given", "name", "." ]
[]
[ { "param": "name", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "name", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 10845, 2355, 628, 461, 12, 780, 508, 13, 288, 203, 3639, 309, 261, 529, 480, 446, 13, 288, 203, 5411, 508, 273, 508, 18, 869, 8915, 5621, 203, 3639, 289, 203, 3639, 327, 4323, 12, 529, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2860, 4309, 1801, 3627, 598, 326, 864, 508, 18, 203, 377, 380, 632, 891, 508, 1770, 434, 326, 4309, 1801, 18, 203, 377, 380, 632, 2463, 2860, 4309, 1801, 3627, 598, 326, 864, 508, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6e7c068dda04e199cb272a0b01667687ec692dd
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/lifecycle/ShardConsumer.java
[ "Apache-2.0" ]
Java
gracefulShutdown
null
public void gracefulShutdown(ShutdownNotification shutdownNotification) { if (subscriber != null) { subscriber.cancel(); } this.shutdownNotification = shutdownNotification; markForShutdown(ShutdownReason.REQUESTED); }
/** * Requests the shutdown of the this ShardConsumer. This should give the record processor a chance to checkpoint * before being shutdown. * * @param shutdownNotification * used to signal that the record processor has been given the chance to shutdown. */
Requests the shutdown of the this ShardConsumer. This should give the record processor a chance to checkpoint before being shutdown. @param shutdownNotification used to signal that the record processor has been given the chance to shutdown.
[ "Requests", "the", "shutdown", "of", "the", "this", "ShardConsumer", ".", "This", "should", "give", "the", "record", "processor", "a", "chance", "to", "checkpoint", "before", "being", "shutdown", ".", "@param", "shutdownNotification", "used", "to", "signal", "that", "the", "record", "processor", "has", "been", "given", "the", "chance", "to", "shutdown", "." ]
public void gracefulShutdown(ShutdownNotification shutdownNotification) { if (subscriber != null) { subscriber.cancel(); } this.shutdownNotification = shutdownNotification; markForShutdown(ShutdownReason.REQUESTED); }
[ "public", "void", "gracefulShutdown", "(", "ShutdownNotification", "shutdownNotification", ")", "{", "if", "(", "subscriber", "!=", "null", ")", "{", "subscriber", ".", "cancel", "(", ")", ";", "}", "this", ".", "shutdownNotification", "=", "shutdownNotification", ";", "markForShutdown", "(", "ShutdownReason", ".", "REQUESTED", ")", ";", "}" ]
Requests the shutdown of the this ShardConsumer.
[ "Requests", "the", "shutdown", "of", "the", "this", "ShardConsumer", "." ]
[]
[ { "param": "shutdownNotification", "type": "ShutdownNotification" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "shutdownNotification", "type": "ShutdownNotification", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 24279, 10961, 12, 10961, 4386, 5731, 4386, 13, 288, 203, 3639, 309, 261, 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326, 333, 16490, 5869, 18, 1220, 1410, 8492, 326, 1409, 6659, 279, 17920, 358, 9776, 203, 377, 380, 1865, 3832, 5731, 18, 203, 377, 380, 203, 377, 380, 632, 891, 5731, 4386, 203, 377, 380, 5411, 1399, 358, 4277, 716, 326, 1409, 6659, 711, 2118, 864, 326, 17920, 358, 5731, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6e7c068dda04e199cb272a0b01667687ec692dd
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/lifecycle/ShardConsumer.java
[ "Apache-2.0" ]
Java
leaseLost
null
public boolean leaseLost() { log.debug("{} : Shutdown({}): Lease lost triggered.", streamIdentifier, shardInfo.shardId()); if (subscriber != null) { subscriber.cancel(); log.debug("{} : Shutdown({}): Subscriber cancelled.", streamIdentifier, shardInfo.shardId()); } markForShutdown(ShutdownReason.LEASE_LOST); return isShutdown(); }
/** * Shutdown this ShardConsumer (including invoking the ShardRecordProcessor shutdown API). * This is called by Worker when it loses responsibility for a shard. * * @return true if shutdown is complete (false if shutdown is still in progress) */
Shutdown this ShardConsumer (including invoking the ShardRecordProcessor shutdown API). This is called by Worker when it loses responsibility for a shard. @return true if shutdown is complete (false if shutdown is still in progress)
[ "Shutdown", "this", "ShardConsumer", "(", "including", "invoking", "the", "ShardRecordProcessor", "shutdown", "API", ")", ".", "This", "is", "called", "by", "Worker", "when", "it", "loses", "responsibility", "for", "a", "shard", ".", "@return", "true", "if", "shutdown", "is", "complete", "(", "false", "if", "shutdown", "is", "still", "in", "progress", ")" ]
public boolean leaseLost() { log.debug("{} : Shutdown({}): Lease lost triggered.", streamIdentifier, shardInfo.shardId()); if (subscriber != null) { subscriber.cancel(); log.debug("{} : Shutdown({}): Subscriber cancelled.", streamIdentifier, shardInfo.shardId()); } markForShutdown(ShutdownReason.LEASE_LOST); return isShutdown(); }
[ "public", "boolean", "leaseLost", "(", ")", "{", "log", ".", "debug", "(", "\"{} : Shutdown({}): Lease lost triggered.\"", ",", "streamIdentifier", ",", "shardInfo", ".", "shardId", "(", ")", ")", ";", "if", "(", "subscriber", "!=", "null", ")", "{", "subscriber", ".", "cancel", "(", ")", ";", "log", ".", "debug", "(", "\"{} : Shutdown({}): Subscriber cancelled.\"", ",", "streamIdentifier", ",", "shardInfo", ".", "shardId", "(", ")", ")", ";", "}", "markForShutdown", "(", "ShutdownReason", ".", "LEASE_LOST", ")", ";", "return", "isShutdown", "(", ")", ";", "}" ]
Shutdown this ShardConsumer (including invoking the ShardRecordProcessor shutdown API).
[ "Shutdown", "this", "ShardConsumer", "(", "including", "invoking", "the", "ShardRecordProcessor", "shutdown", "API", ")", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 11863, 19024, 1435, 288, 203, 3639, 613, 18, 4148, 2932, 2916, 294, 17640, 23506, 4672, 23175, 13557, 10861, 1199, 16, 1407, 3004, 16, 5820, 966, 18, 22630, 548, 10663, 203, 3639, 309, 261, 26410, 480, 446, 13, 288, 203, 5411, 9467, 18, 10996, 5621, 203, 5411, 613, 18, 4148, 2932, 2916, 294, 17640, 23506, 4672, 21339, 13927, 1199, 16, 1407, 3004, 16, 5820, 966, 18, 22630, 548, 10663, 203, 3639, 289, 203, 3639, 2267, 1290, 10961, 12, 10961, 8385, 18, 22357, 67, 1502, 882, 1769, 203, 3639, 327, 353, 10961, 5621, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 17640, 333, 16490, 5869, 261, 31348, 15387, 326, 16490, 2115, 5164, 5731, 1491, 2934, 203, 377, 380, 1220, 353, 2566, 635, 11016, 1347, 518, 437, 2420, 29353, 364, 279, 5820, 18, 203, 377, 380, 203, 377, 380, 632, 2463, 638, 309, 5731, 353, 3912, 261, 5743, 309, 5731, 353, 4859, 316, 4007, 13, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6e7c068dda04e199cb272a0b01667687ec692dd
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/lifecycle/ShardConsumer.java
[ "Apache-2.0" ]
Java
metricsWrappingFunction
null
private static Function<ConsumerTask, ConsumerTask> metricsWrappingFunction(MetricsFactory metricsFactory) { return (task) -> { if (task == null) { return null; } else { return new MetricsCollectingTaskDecorator(task, metricsFactory); } }; }
/** * Default task wrapping function for metrics * * @param metricsFactory * the factory used for reporting metrics * @return a function that will wrap the task with a metrics reporter */
Default task wrapping function for metrics @param metricsFactory the factory used for reporting metrics @return a function that will wrap the task with a metrics reporter
[ "Default", "task", "wrapping", "function", "for", "metrics", "@param", "metricsFactory", "the", "factory", "used", "for", "reporting", "metrics", "@return", "a", "function", "that", "will", "wrap", "the", "task", "with", "a", "metrics", "reporter" ]
private static Function<ConsumerTask, ConsumerTask> metricsWrappingFunction(MetricsFactory metricsFactory) { return (task) -> { if (task == null) { return null; } else { return new MetricsCollectingTaskDecorator(task, metricsFactory); } }; }
[ "private", "static", "Function", "<", "ConsumerTask", ",", "ConsumerTask", ">", "metricsWrappingFunction", "(", "MetricsFactory", "metricsFactory", ")", "{", "return", "(", "task", ")", "->", "{", "if", "(", "task", "==", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "new", "MetricsCollectingTaskDecorator", "(", "task", ",", "metricsFactory", ")", ";", "}", "}", ";", "}" ]
Default task wrapping function for metrics @param metricsFactory the factory used for reporting metrics @return a function that will wrap the task with a metrics reporter
[ "Default", "task", "wrapping", "function", "for", "metrics", "@param", "metricsFactory", "the", "factory", "used", "for", "reporting", "metrics", "@return", "a", "function", "that", "will", "wrap", "the", "task", "with", "a", "metrics", "reporter" ]
[]
[ { "param": "metricsFactory", "type": "MetricsFactory" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "metricsFactory", "type": "MetricsFactory", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 4284, 32, 5869, 2174, 16, 9326, 2174, 34, 4309, 30888, 2083, 12, 5653, 1733, 4309, 1733, 13, 288, 203, 3639, 327, 261, 4146, 13, 317, 288, 203, 5411, 309, 261, 4146, 422, 446, 13, 288, 203, 7734, 327, 446, 31, 203, 5411, 289, 469, 288, 203, 7734, 327, 394, 10845, 10808, 310, 2174, 10361, 12, 4146, 16, 4309, 1733, 1769, 203, 5411, 289, 203, 3639, 289, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2989, 1562, 14702, 445, 364, 4309, 203, 377, 380, 203, 377, 380, 632, 891, 4309, 1733, 203, 377, 380, 5411, 326, 3272, 1399, 364, 16096, 4309, 203, 377, 380, 632, 2463, 279, 445, 716, 903, 2193, 326, 1562, 598, 279, 4309, 11528, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
37eea1a3506940f7b1c32ab14553ea303aabf977
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/common/DiagnosticUtils.java
[ "Apache-2.0" ]
Java
takeDelayedDeliveryActionIfRequired
null
public static void takeDelayedDeliveryActionIfRequired(String resourceIdentifier, Instant enqueueTimestamp, Logger log) { final long durationBetweenEnqueueAndAckInMillis = Duration .between(enqueueTimestamp, Instant.now()).toMillis(); if (durationBetweenEnqueueAndAckInMillis > MAX_TIME_BETWEEN_REQUEST_RESPONSE / 3) { // The above condition logs the warn msg if the delivery time exceeds 11 seconds. log.warn( "{}: Record delivery time to shard consumer is high at {} millis. Check the ExecutorStateEvent logs" + " to see the state of the executor service. Also check if the RecordProcessor's processing " + "time is high. ", resourceIdentifier, durationBetweenEnqueueAndAckInMillis); } else if (log.isDebugEnabled()) { log.debug("{}: Record delivery time to shard consumer is {} millis", resourceIdentifier, durationBetweenEnqueueAndAckInMillis); } }
/** * Util for RecordPublisher to measure the event delivery latency of the executor service and take appropriate action. * @param resourceIdentifier of the shard that is having delayed delivery * @param enqueueTimestamp of the event submitted to the executor service * @param log Slf4j Logger from RecordPublisher to log the events */
Util for RecordPublisher to measure the event delivery latency of the executor service and take appropriate action. @param resourceIdentifier of the shard that is having delayed delivery @param enqueueTimestamp of the event submitted to the executor service @param log Slf4j Logger from RecordPublisher to log the events
[ "Util", "for", "RecordPublisher", "to", "measure", "the", "event", "delivery", "latency", "of", "the", "executor", "service", "and", "take", "appropriate", "action", ".", "@param", "resourceIdentifier", "of", "the", "shard", "that", "is", "having", "delayed", "delivery", "@param", "enqueueTimestamp", "of", "the", "event", "submitted", "to", "the", "executor", "service", "@param", "log", "Slf4j", "Logger", "from", "RecordPublisher", "to", "log", "the", "events" ]
public static void takeDelayedDeliveryActionIfRequired(String resourceIdentifier, Instant enqueueTimestamp, Logger log) { final long durationBetweenEnqueueAndAckInMillis = Duration .between(enqueueTimestamp, Instant.now()).toMillis(); if (durationBetweenEnqueueAndAckInMillis > MAX_TIME_BETWEEN_REQUEST_RESPONSE / 3) { log.warn( "{}: Record delivery time to shard consumer is high at {} millis. Check the ExecutorStateEvent logs" + " to see the state of the executor service. Also check if the RecordProcessor's processing " + "time is high. ", resourceIdentifier, durationBetweenEnqueueAndAckInMillis); } else if (log.isDebugEnabled()) { log.debug("{}: Record delivery time to shard consumer is {} millis", resourceIdentifier, durationBetweenEnqueueAndAckInMillis); } }
[ "public", "static", "void", "takeDelayedDeliveryActionIfRequired", "(", "String", "resourceIdentifier", ",", "Instant", "enqueueTimestamp", ",", "Logger", "log", ")", "{", "final", "long", "durationBetweenEnqueueAndAckInMillis", "=", "Duration", ".", "between", "(", "enqueueTimestamp", ",", "Instant", ".", "now", "(", ")", ")", ".", "toMillis", "(", ")", ";", "if", "(", "durationBetweenEnqueueAndAckInMillis", ">", "MAX_TIME_BETWEEN_REQUEST_RESPONSE", "/", "3", ")", "{", "log", ".", "warn", "(", "\"{}: Record delivery time to shard consumer is high at {} millis. Check the ExecutorStateEvent logs\"", "+", "\" to see the state of the executor service. Also check if the RecordProcessor's processing \"", "+", "\"time is high. \"", ",", "resourceIdentifier", ",", "durationBetweenEnqueueAndAckInMillis", ")", ";", "}", "else", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "\"{}: Record delivery time to shard consumer is {} millis\"", ",", "resourceIdentifier", ",", "durationBetweenEnqueueAndAckInMillis", ")", ";", "}", "}" ]
Util for RecordPublisher to measure the event delivery latency of the executor service and take appropriate action.
[ "Util", "for", "RecordPublisher", "to", "measure", "the", "event", "delivery", "latency", "of", "the", "executor", "service", "and", "take", "appropriate", "action", "." ]
[ "// The above condition logs the warn msg if the delivery time exceeds 11 seconds." ]
[ { "param": "resourceIdentifier", "type": "String" }, { "param": "enqueueTimestamp", "type": "Instant" }, { "param": "log", "type": "Logger" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "resourceIdentifier", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "enqueueTimestamp", "type": "Instant", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "log", "type": "Logger", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 4862, 29527, 8909, 1803, 2047, 3705, 12, 780, 1058, 3004, 16, 11190, 12850, 4921, 16, 4242, 613, 13, 288, 203, 3639, 727, 1525, 3734, 11831, 25327, 1876, 11931, 16620, 273, 4822, 203, 7734, 263, 15019, 12, 21798, 4921, 16, 11190, 18, 3338, 1435, 2934, 869, 4814, 5621, 203, 3639, 309, 261, 8760, 11831, 25327, 1876, 11931, 16620, 405, 4552, 67, 4684, 67, 38, 19311, 67, 5519, 67, 14508, 342, 890, 13, 288, 203, 5411, 368, 1021, 5721, 2269, 5963, 326, 1894, 1234, 309, 326, 7912, 813, 14399, 4648, 3974, 18, 203, 5411, 613, 18, 8935, 12, 203, 10792, 25287, 5059, 7912, 813, 358, 5820, 4765, 353, 3551, 622, 2618, 14833, 18, 2073, 326, 13146, 1119, 1133, 5963, 6, 203, 18701, 397, 315, 358, 2621, 326, 919, 434, 326, 6601, 1156, 18, 8080, 866, 309, 326, 5059, 5164, 1807, 4929, 315, 203, 18701, 397, 315, 957, 353, 3551, 18, 3104, 203, 10792, 1058, 3004, 16, 3734, 11831, 25327, 1876, 11931, 16620, 1769, 203, 3639, 289, 469, 309, 261, 1330, 18, 291, 2829, 1526, 10756, 288, 203, 5411, 613, 18, 4148, 2932, 2916, 30, 5059, 7912, 813, 358, 5820, 4765, 353, 2618, 14833, 3113, 1058, 3004, 16, 203, 10792, 3734, 11831, 25327, 1876, 11931, 16620, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 3564, 364, 5059, 15960, 358, 6649, 326, 871, 7912, 19518, 434, 326, 6601, 1156, 471, 4862, 5505, 1301, 18, 203, 377, 380, 632, 891, 1058, 3004, 434, 326, 5820, 716, 353, 7999, 15278, 7912, 203, 377, 380, 632, 891, 12850, 4921, 434, 326, 871, 9638, 358, 326, 6601, 1156, 203, 377, 380, 632, 891, 613, 9708, 74, 24, 78, 4242, 628, 5059, 15960, 358, 613, 326, 2641, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
6a0c06b48136409b43a240572624aa408e63bf6d
Unacademy/amazon-kinesis-client
amazon-kinesis-client-multilang/src/test/java/software/amazon/kinesis/multilang/MessageWriterTest.java
[ "Apache-2.0" ]
Java
writeCheckpointMessageNoErrorTest
null
@Test public void writeCheckpointMessageNoErrorTest() throws IOException, InterruptedException, ExecutionException { Future<Boolean> future = this.messageWriter.writeCheckpointMessageWithError("1234", 0L, null); future.get(); verify(this.stream, Mockito.atLeastOnce()).write(Mockito.any(byte[].class), Mockito.anyInt(), Mockito.anyInt()); verify(this.stream, Mockito.atLeastOnce()).flush(); }
/* * Here we are just testing that calling write causes bytes to get written to the stream. */
Here we are just testing that calling write causes bytes to get written to the stream.
[ "Here", "we", "are", "just", "testing", "that", "calling", "write", "causes", "bytes", "to", "get", "written", "to", "the", "stream", "." ]
@Test public void writeCheckpointMessageNoErrorTest() throws IOException, InterruptedException, ExecutionException { Future<Boolean> future = this.messageWriter.writeCheckpointMessageWithError("1234", 0L, null); future.get(); verify(this.stream, Mockito.atLeastOnce()).write(Mockito.any(byte[].class), Mockito.anyInt(), Mockito.anyInt()); verify(this.stream, Mockito.atLeastOnce()).flush(); }
[ "@", "Test", "public", "void", "writeCheckpointMessageNoErrorTest", "(", ")", "throws", "IOException", ",", "InterruptedException", ",", "ExecutionException", "{", "Future", "<", "Boolean", ">", "future", "=", "this", ".", "messageWriter", ".", "writeCheckpointMessageWithError", "(", "\"1234\"", ",", "0L", ",", "null", ")", ";", "future", ".", "get", "(", ")", ";", "verify", "(", "this", ".", "stream", ",", "Mockito", ".", "atLeastOnce", "(", ")", ")", ".", "write", "(", "Mockito", ".", "any", "(", "byte", "[", "]", ".", "class", ")", ",", "Mockito", ".", "anyInt", "(", ")", ",", "Mockito", ".", "anyInt", "(", ")", ")", ";", "verify", "(", "this", ".", "stream", ",", "Mockito", ".", "atLeastOnce", "(", ")", ")", ".", "flush", "(", ")", ";", "}" ]
Here we are just testing that calling write causes bytes to get written to the stream.
[ "Here", "we", "are", "just", "testing", "that", "calling", "write", "causes", "bytes", "to", "get", "written", "to", "the", "stream", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1045, 14431, 1079, 2279, 668, 4709, 1435, 1216, 1860, 16, 7558, 16, 20205, 288, 203, 3639, 9108, 32, 5507, 34, 3563, 273, 333, 18, 2150, 2289, 18, 2626, 14431, 1079, 25104, 2932, 28462, 3113, 374, 48, 16, 446, 1769, 203, 3639, 3563, 18, 588, 5621, 203, 3639, 3929, 12, 2211, 18, 3256, 16, 7867, 11250, 18, 270, 17319, 12212, 1435, 2934, 2626, 12, 9865, 11250, 18, 2273, 12, 7229, 63, 8009, 1106, 3631, 7867, 11250, 18, 2273, 1702, 9334, 203, 7734, 7867, 11250, 18, 2273, 1702, 10663, 203, 3639, 3929, 12, 2211, 18, 3256, 16, 7867, 11250, 18, 270, 17319, 12212, 1435, 2934, 11330, 5621, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 377, 380, 13743, 732, 854, 2537, 7769, 716, 4440, 1045, 14119, 1731, 358, 336, 5941, 358, 326, 1407, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
4a07ed7d4ab1fd9fda4d50adf198b6c65505bce2
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/lifecycle/ShutdownReason.java
[ "Apache-2.0" ]
Java
canTransitionTo
null
public boolean canTransitionTo(ShutdownReason reason) { if (reason == null) { return false; } return reason.rank > this.rank; }
/** * Indicates whether the given reason can override the current reason. * * @param reason the reason to transition to * @return true if the transition is allowed, false if it's not. */
Indicates whether the given reason can override the current reason. @param reason the reason to transition to @return true if the transition is allowed, false if it's not.
[ "Indicates", "whether", "the", "given", "reason", "can", "override", "the", "current", "reason", ".", "@param", "reason", "the", "reason", "to", "transition", "to", "@return", "true", "if", "the", "transition", "is", "allowed", "false", "if", "it", "'", "s", "not", "." ]
public boolean canTransitionTo(ShutdownReason reason) { if (reason == null) { return false; } return reason.rank > this.rank; }
[ "public", "boolean", "canTransitionTo", "(", "ShutdownReason", "reason", ")", "{", "if", "(", "reason", "==", "null", ")", "{", "return", "false", ";", "}", "return", "reason", ".", "rank", ">", "this", ".", "rank", ";", "}" ]
Indicates whether the given reason can override the current reason.
[ "Indicates", "whether", "the", "given", "reason", "can", "override", "the", "current", "reason", "." ]
[]
[ { "param": "reason", "type": "ShutdownReason" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "reason", "type": "ShutdownReason", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 848, 8850, 774, 12, 10961, 8385, 3971, 13, 288, 203, 3639, 309, 261, 10579, 422, 446, 13, 288, 203, 5411, 327, 629, 31, 203, 3639, 289, 203, 3639, 327, 3971, 18, 11500, 405, 333, 18, 11500, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 18336, 2856, 326, 864, 3971, 848, 3849, 326, 783, 3971, 18, 203, 377, 380, 7010, 377, 380, 632, 891, 3971, 326, 3971, 358, 6007, 358, 203, 377, 380, 632, 2463, 638, 309, 326, 6007, 353, 2935, 16, 629, 309, 518, 1807, 486, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
972d39519d201a9c109582b94a073a614b516c2a
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/leases/dynamodb/DynamoDBLeaseTakerIntegrationTest.java
[ "Apache-2.0" ]
Java
testNonGreedyTake
null
@Test public void testNonGreedyTake() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); for (int i = 0; i < 3; i++) { builder.withLease(Integer.toString(i), null); } builder.withLease("4", "bar").build(); // setting multiplier to unusually high number to avoid very old lease taking taker.withVeryOldLeaseDurationNanosMultipler(5000000000L); builder.takeMutateAssert(taker, 2); }
/** * Verify that we take leases non-greedily by setting up an environment where there are 4 leases and 2 workers, * only one of which holds a lease. This leaves 3 free leases, but LeaseTaker should decide it needs 2 leases and * only take 2. */
Verify that we take leases non-greedily by setting up an environment where there are 4 leases and 2 workers, only one of which holds a lease. This leaves 3 free leases, but LeaseTaker should decide it needs 2 leases and only take 2.
[ "Verify", "that", "we", "take", "leases", "non", "-", "greedily", "by", "setting", "up", "an", "environment", "where", "there", "are", "4", "leases", "and", "2", "workers", "only", "one", "of", "which", "holds", "a", "lease", ".", "This", "leaves", "3", "free", "leases", "but", "LeaseTaker", "should", "decide", "it", "needs", "2", "leases", "and", "only", "take", "2", "." ]
@Test public void testNonGreedyTake() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); for (int i = 0; i < 3; i++) { builder.withLease(Integer.toString(i), null); } builder.withLease("4", "bar").build(); taker.withVeryOldLeaseDurationNanosMultipler(5000000000L); builder.takeMutateAssert(taker, 2); }
[ "@", "Test", "public", "void", "testNonGreedyTake", "(", ")", "throws", "LeasingException", "{", "TestHarnessBuilder", "builder", "=", "new", "TestHarnessBuilder", "(", "leaseRefresher", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "3", ";", "i", "++", ")", "{", "builder", ".", "withLease", "(", "Integer", ".", "toString", "(", "i", ")", ",", "null", ")", ";", "}", "builder", ".", "withLease", "(", "\"4\"", ",", "\"bar\"", ")", ".", "build", "(", ")", ";", "taker", ".", "withVeryOldLeaseDurationNanosMultipler", "(", "5000000000L", ")", ";", "builder", ".", "takeMutateAssert", "(", "taker", ",", "2", ")", ";", "}" ]
Verify that we take leases non-greedily by setting up an environment where there are 4 leases and 2 workers, only one of which holds a lease.
[ "Verify", "that", "we", "take", "leases", "non", "-", "greedily", "by", "setting", "up", "an", "environment", "where", "there", "are", "4", "leases", "and", "2", "workers", "only", "one", "of", "which", "holds", "a", "lease", "." ]
[ "// setting multiplier to unusually high number to avoid very old lease taking" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 3989, 43, 15656, 93, 13391, 1435, 1216, 3519, 11730, 503, 288, 203, 3639, 7766, 44, 1303, 403, 1263, 2089, 273, 394, 7766, 44, 1303, 403, 1263, 12, 2508, 1957, 455, 1614, 1769, 203, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 890, 31, 277, 27245, 288, 203, 5411, 2089, 18, 1918, 17746, 12, 4522, 18, 10492, 12, 77, 3631, 446, 1769, 203, 3639, 289, 203, 203, 3639, 2089, 18, 1918, 17746, 2932, 24, 3113, 315, 3215, 20387, 3510, 5621, 203, 203, 3639, 368, 3637, 15027, 358, 640, 407, 3452, 3551, 1300, 358, 4543, 8572, 1592, 11863, 13763, 203, 3639, 268, 6388, 18, 1918, 58, 627, 7617, 17746, 5326, 15739, 5002, 20728, 12, 25, 2787, 11706, 48, 1769, 203, 3639, 2089, 18, 22188, 7420, 340, 8213, 12, 88, 6388, 16, 576, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 8553, 716, 732, 4862, 884, 3304, 1661, 17, 11556, 329, 3220, 635, 3637, 731, 392, 3330, 1625, 1915, 854, 1059, 884, 3304, 471, 576, 9798, 16, 203, 377, 380, 1338, 1245, 434, 1492, 14798, 279, 11863, 18, 1220, 15559, 890, 4843, 884, 3304, 16, 1496, 23175, 56, 6388, 1410, 16288, 518, 4260, 576, 884, 3304, 471, 203, 377, 380, 1338, 4862, 576, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
972d39519d201a9c109582b94a073a614b516c2a
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/leases/dynamodb/DynamoDBLeaseTakerIntegrationTest.java
[ "Apache-2.0" ]
Java
testVeryOldLeaseTaker
null
@Test public void testVeryOldLeaseTaker() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); for (int i = 0; i < 3; i++) { builder.withLease(Integer.toString(i), null); } builder.withLease("4", "bar").build(); // setting multiplier to unusually high number to avoid very old lease taking builder.takeMutateAssert(taker, 3); }
/** * Verify that we take all very old leases by setting up an environment where there are 4 leases and 2 workers, * only one of which holds a lease. This leaves 3 free leases. LeaseTaker should take all 3 leases since they * are denoted as very old. */
Verify that we take all very old leases by setting up an environment where there are 4 leases and 2 workers, only one of which holds a lease. This leaves 3 free leases. LeaseTaker should take all 3 leases since they are denoted as very old.
[ "Verify", "that", "we", "take", "all", "very", "old", "leases", "by", "setting", "up", "an", "environment", "where", "there", "are", "4", "leases", "and", "2", "workers", "only", "one", "of", "which", "holds", "a", "lease", ".", "This", "leaves", "3", "free", "leases", ".", "LeaseTaker", "should", "take", "all", "3", "leases", "since", "they", "are", "denoted", "as", "very", "old", "." ]
@Test public void testVeryOldLeaseTaker() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); for (int i = 0; i < 3; i++) { builder.withLease(Integer.toString(i), null); } builder.withLease("4", "bar").build(); builder.takeMutateAssert(taker, 3); }
[ "@", "Test", "public", "void", "testVeryOldLeaseTaker", "(", ")", "throws", "LeasingException", "{", "TestHarnessBuilder", "builder", "=", "new", "TestHarnessBuilder", "(", "leaseRefresher", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "3", ";", "i", "++", ")", "{", "builder", ".", "withLease", "(", "Integer", ".", "toString", "(", "i", ")", ",", "null", ")", ";", "}", "builder", ".", "withLease", "(", "\"4\"", ",", "\"bar\"", ")", ".", "build", "(", ")", ";", "builder", ".", "takeMutateAssert", "(", "taker", ",", "3", ")", ";", "}" ]
Verify that we take all very old leases by setting up an environment where there are 4 leases and 2 workers, only one of which holds a lease.
[ "Verify", "that", "we", "take", "all", "very", "old", "leases", "by", "setting", "up", "an", "environment", "where", "there", "are", "4", "leases", "and", "2", "workers", "only", "one", "of", "which", "holds", "a", "lease", "." ]
[ "// setting multiplier to unusually high number to avoid very old lease taking" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 58, 627, 7617, 17746, 56, 6388, 1435, 1216, 3519, 11730, 503, 288, 203, 3639, 7766, 44, 1303, 403, 1263, 2089, 273, 394, 7766, 44, 1303, 403, 1263, 12, 2508, 1957, 455, 1614, 1769, 203, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 890, 31, 277, 27245, 288, 203, 5411, 2089, 18, 1918, 17746, 12, 4522, 18, 10492, 12, 77, 3631, 446, 1769, 203, 3639, 289, 203, 203, 3639, 2089, 18, 1918, 17746, 2932, 24, 3113, 315, 3215, 20387, 3510, 5621, 203, 203, 3639, 368, 3637, 15027, 358, 640, 407, 3452, 3551, 1300, 358, 4543, 8572, 1592, 11863, 13763, 203, 3639, 2089, 18, 22188, 7420, 340, 8213, 12, 88, 6388, 16, 890, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 884, 3304, 471, 576, 9798, 16, 203, 377, 380, 1338, 1245, 434, 1492, 14798, 279, 11863, 18, 1220, 15559, 890, 4843, 884, 3304, 18, 23175, 56, 6388, 1410, 4862, 777, 890, 884, 3304, 3241, 2898, 203, 377, 380, 854, 5545, 16474, 487, 8572, 1592, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
972d39519d201a9c109582b94a073a614b516c2a
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/leases/dynamodb/DynamoDBLeaseTakerIntegrationTest.java
[ "Apache-2.0" ]
Java
testGetAllLeases
null
@Test public void testGetAllLeases() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); Map<String, Lease> addedLeases = builder.withLease("1", "bar") .withLease("2", "bar") .withLease("3", "baz") .withLease("4", "baz") .withLease("5", "foo") .build(); // In the current DynamoDBLeaseTaker implementation getAllLeases() gets leases from an internal cache that is built during takeLeases() operation assertThat(taker.allLeases().size(), equalTo(0)); taker.takeLeases(); Collection<Lease> allLeases = taker.allLeases(); assertThat(allLeases.size(), equalTo(addedLeases.size())); assertThat(addedLeases.values().containsAll(allLeases), equalTo(true)); }
/** * Verify that when getAllLeases() is called, DynamoDBLeaseTaker * - does not call listLeases() * - returns cached result was built during takeLeases() operation to return result */
Verify that when getAllLeases() is called, DynamoDBLeaseTaker - does not call listLeases() - returns cached result was built during takeLeases() operation to return result
[ "Verify", "that", "when", "getAllLeases", "()", "is", "called", "DynamoDBLeaseTaker", "-", "does", "not", "call", "listLeases", "()", "-", "returns", "cached", "result", "was", "built", "during", "takeLeases", "()", "operation", "to", "return", "result" ]
@Test public void testGetAllLeases() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); Map<String, Lease> addedLeases = builder.withLease("1", "bar") .withLease("2", "bar") .withLease("3", "baz") .withLease("4", "baz") .withLease("5", "foo") .build(); assertThat(taker.allLeases().size(), equalTo(0)); taker.takeLeases(); Collection<Lease> allLeases = taker.allLeases(); assertThat(allLeases.size(), equalTo(addedLeases.size())); assertThat(addedLeases.values().containsAll(allLeases), equalTo(true)); }
[ "@", "Test", "public", "void", "testGetAllLeases", "(", ")", "throws", "LeasingException", "{", "TestHarnessBuilder", "builder", "=", "new", "TestHarnessBuilder", "(", "leaseRefresher", ")", ";", "Map", "<", "String", ",", "Lease", ">", "addedLeases", "=", "builder", ".", "withLease", "(", "\"1\"", ",", "\"bar\"", ")", ".", "withLease", "(", "\"2\"", ",", "\"bar\"", ")", ".", "withLease", "(", "\"3\"", ",", "\"baz\"", ")", ".", "withLease", "(", "\"4\"", ",", "\"baz\"", ")", ".", "withLease", "(", "\"5\"", ",", "\"foo\"", ")", ".", "build", "(", ")", ";", "assertThat", "(", "taker", ".", "allLeases", "(", ")", ".", "size", "(", ")", ",", "equalTo", "(", "0", ")", ")", ";", "taker", ".", "takeLeases", "(", ")", ";", "Collection", "<", "Lease", ">", "allLeases", "=", "taker", ".", "allLeases", "(", ")", ";", "assertThat", "(", "allLeases", ".", "size", "(", ")", ",", "equalTo", "(", "addedLeases", ".", "size", "(", ")", ")", ")", ";", "assertThat", "(", "addedLeases", ".", "values", "(", ")", ".", "containsAll", "(", "allLeases", ")", ",", "equalTo", "(", "true", ")", ")", ";", "}" ]
Verify that when getAllLeases() is called, DynamoDBLeaseTaker - does not call listLeases() - returns cached result was built during takeLeases() operation to return result
[ "Verify", "that", "when", "getAllLeases", "()", "is", "called", "DynamoDBLeaseTaker", "-", "does", "not", "call", "listLeases", "()", "-", "returns", "cached", "result", "was", "built", "during", "takeLeases", "()", "operation", "to", "return", "result" ]
[ "// In the current DynamoDBLeaseTaker implementation getAllLeases() gets leases from an internal cache that is built during takeLeases() operation" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 21413, 1682, 3304, 1435, 1216, 3519, 11730, 503, 288, 203, 3639, 7766, 44, 1303, 403, 1263, 2089, 273, 394, 7766, 44, 1303, 403, 1263, 12, 2508, 1957, 455, 1614, 1769, 203, 203, 3639, 1635, 32, 780, 16, 23175, 34, 3096, 1682, 3304, 273, 2089, 18, 1918, 17746, 2932, 21, 3113, 315, 3215, 7923, 203, 7734, 263, 1918, 17746, 2932, 22, 3113, 315, 3215, 7923, 203, 7734, 263, 1918, 17746, 2932, 23, 3113, 315, 70, 1561, 7923, 203, 7734, 263, 1918, 17746, 2932, 24, 3113, 315, 70, 1561, 7923, 203, 7734, 263, 1918, 17746, 2932, 25, 3113, 315, 11351, 7923, 203, 7734, 263, 3510, 5621, 203, 203, 3639, 368, 657, 326, 783, 16787, 17746, 56, 6388, 4471, 5514, 1682, 3304, 1435, 5571, 884, 3304, 628, 392, 2713, 1247, 716, 353, 6650, 4982, 4862, 1682, 3304, 1435, 1674, 203, 3639, 1815, 18163, 12, 88, 6388, 18, 454, 1682, 3304, 7675, 1467, 9334, 3959, 774, 12, 20, 10019, 203, 203, 3639, 268, 6388, 18, 22188, 1682, 3304, 5621, 203, 203, 3639, 2200, 32, 17746, 34, 777, 1682, 3304, 273, 268, 6388, 18, 454, 1682, 3304, 5621, 203, 3639, 1815, 18163, 12, 454, 1682, 3304, 18, 1467, 9334, 3959, 774, 12, 9665, 1682, 3304, 18, 1467, 1435, 10019, 203, 3639, 1815, 18163, 12, 9665, 1682, 3304, 18, 2372, 7675, 12298, 1595, 12, 454, 1682, 3304, 3631, 3959, 774, 12, 3767, 10019, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 8553, 716, 1347, 5514, 1682, 3304, 1435, 353, 2566, 16, 16787, 17746, 56, 6388, 203, 377, 380, 300, 1552, 486, 745, 666, 1682, 3304, 1435, 203, 377, 380, 300, 1135, 3472, 563, 1703, 6650, 4982, 4862, 1682, 3304, 1435, 1674, 358, 327, 563, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
972d39519d201a9c109582b94a073a614b516c2a
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/leases/dynamodb/DynamoDBLeaseTakerIntegrationTest.java
[ "Apache-2.0" ]
Java
testNoStealWhenOffByOne
null
@Test public void testNoStealWhenOffByOne() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); builder.withLease("1", "bar") .withLease("2", "bar") .withLease("3", "baz") .withLease("4", "baz") .withLease("5", "foo") .build(); // Takes nothing since all leases are new and owned and we won't steal if we're short by 1. builder.takeMutateAssert(taker); }
/** * Verify that LeaseTaker does not steal when it's only short 1 lease and the other worker is at target. Set up a * scenario where there are 4 leases held by two servers, and a third server with one lease. The third server should * not steal. */
Verify that LeaseTaker does not steal when it's only short 1 lease and the other worker is at target. Set up a scenario where there are 4 leases held by two servers, and a third server with one lease. The third server should not steal.
[ "Verify", "that", "LeaseTaker", "does", "not", "steal", "when", "it", "'", "s", "only", "short", "1", "lease", "and", "the", "other", "worker", "is", "at", "target", ".", "Set", "up", "a", "scenario", "where", "there", "are", "4", "leases", "held", "by", "two", "servers", "and", "a", "third", "server", "with", "one", "lease", ".", "The", "third", "server", "should", "not", "steal", "." ]
@Test public void testNoStealWhenOffByOne() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); builder.withLease("1", "bar") .withLease("2", "bar") .withLease("3", "baz") .withLease("4", "baz") .withLease("5", "foo") .build(); builder.takeMutateAssert(taker); }
[ "@", "Test", "public", "void", "testNoStealWhenOffByOne", "(", ")", "throws", "LeasingException", "{", "TestHarnessBuilder", "builder", "=", "new", "TestHarnessBuilder", "(", "leaseRefresher", ")", ";", "builder", ".", "withLease", "(", "\"1\"", ",", "\"bar\"", ")", ".", "withLease", "(", "\"2\"", ",", "\"bar\"", ")", ".", "withLease", "(", "\"3\"", ",", "\"baz\"", ")", ".", "withLease", "(", "\"4\"", ",", "\"baz\"", ")", ".", "withLease", "(", "\"5\"", ",", "\"foo\"", ")", ".", "build", "(", ")", ";", "builder", ".", "takeMutateAssert", "(", "taker", ")", ";", "}" ]
Verify that LeaseTaker does not steal when it's only short 1 lease and the other worker is at target.
[ "Verify", "that", "LeaseTaker", "does", "not", "steal", "when", "it", "'", "s", "only", "short", "1", "lease", "and", "the", "other", "worker", "is", "at", "target", "." ]
[ "// Takes nothing since all leases are new and owned and we won't steal if we're short by 1." ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 2279, 510, 73, 287, 9434, 7210, 858, 3335, 1435, 1216, 3519, 11730, 503, 288, 203, 3639, 7766, 44, 1303, 403, 1263, 2089, 273, 394, 7766, 44, 1303, 403, 1263, 12, 2508, 1957, 455, 1614, 1769, 203, 203, 3639, 2089, 18, 1918, 17746, 2932, 21, 3113, 315, 3215, 7923, 203, 7734, 263, 1918, 17746, 2932, 22, 3113, 315, 3215, 7923, 203, 7734, 263, 1918, 17746, 2932, 23, 3113, 315, 70, 1561, 7923, 203, 7734, 263, 1918, 17746, 2932, 24, 3113, 315, 70, 1561, 7923, 203, 7734, 263, 1918, 17746, 2932, 25, 3113, 315, 11351, 7923, 203, 7734, 263, 3510, 5621, 203, 203, 3639, 368, 23004, 5083, 3241, 777, 884, 3304, 854, 394, 471, 16199, 471, 732, 8462, 1404, 18654, 287, 309, 732, 4565, 3025, 635, 404, 18, 203, 3639, 2089, 18, 22188, 7420, 340, 8213, 12, 88, 6388, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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807, 1338, 3025, 404, 11863, 471, 326, 1308, 4322, 353, 622, 1018, 18, 1000, 731, 279, 203, 377, 380, 10766, 1625, 1915, 854, 1059, 884, 3304, 15770, 635, 2795, 7084, 16, 471, 279, 12126, 1438, 598, 1245, 11863, 18, 1021, 12126, 1438, 1410, 203, 377, 380, 486, 18654, 287, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
972d39519d201a9c109582b94a073a614b516c2a
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/leases/dynamodb/DynamoDBLeaseTakerIntegrationTest.java
[ "Apache-2.0" ]
Java
testSteal
null
@Test public void testSteal() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); builder.withLease("1", "bar"); for (int i = 2; i <= 6; i++) { String shardId = Integer.toString(i); builder.withLease(shardId, "baz"); } builder.build(); // Assert that one lease was stolen from baz. Map<String, Lease> takenLeases = builder.takeMutateAssert(taker, 1); // Assert that it was one of baz's leases (shardId != 1) String shardIdStolen = takenLeases.keySet().iterator().next(); Assert.assertFalse(shardIdStolen.equals("1")); }
/** * Verify that one activity is stolen from the highest loaded server when a server needs more than one lease and no * expired leases are available. Setup: 4 leases, server foo holds 0, bar holds 1, baz holds 5. * * Foo should steal from baz. */
Verify that one activity is stolen from the highest loaded server when a server needs more than one lease and no expired leases are available. Setup: 4 leases, server foo holds 0, bar holds 1, baz holds 5. Foo should steal from baz.
[ "Verify", "that", "one", "activity", "is", "stolen", "from", "the", "highest", "loaded", "server", "when", "a", "server", "needs", "more", "than", "one", "lease", "and", "no", "expired", "leases", "are", "available", ".", "Setup", ":", "4", "leases", "server", "foo", "holds", "0", "bar", "holds", "1", "baz", "holds", "5", ".", "Foo", "should", "steal", "from", "baz", "." ]
@Test public void testSteal() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); builder.withLease("1", "bar"); for (int i = 2; i <= 6; i++) { String shardId = Integer.toString(i); builder.withLease(shardId, "baz"); } builder.build(); Map<String, Lease> takenLeases = builder.takeMutateAssert(taker, 1); String shardIdStolen = takenLeases.keySet().iterator().next(); Assert.assertFalse(shardIdStolen.equals("1")); }
[ "@", "Test", "public", "void", "testSteal", "(", ")", "throws", "LeasingException", "{", "TestHarnessBuilder", "builder", "=", "new", "TestHarnessBuilder", "(", "leaseRefresher", ")", ";", "builder", ".", "withLease", "(", "\"1\"", ",", "\"bar\"", ")", ";", "for", "(", "int", "i", "=", "2", ";", "i", "<=", "6", ";", "i", "++", ")", "{", "String", "shardId", "=", "Integer", ".", "toString", "(", "i", ")", ";", "builder", ".", "withLease", "(", "shardId", ",", "\"baz\"", ")", ";", "}", "builder", ".", "build", "(", ")", ";", "Map", "<", "String", ",", "Lease", ">", "takenLeases", "=", "builder", ".", "takeMutateAssert", "(", "taker", ",", "1", ")", ";", "String", "shardIdStolen", "=", "takenLeases", ".", "keySet", "(", ")", ".", "iterator", "(", ")", ".", "next", "(", ")", ";", "Assert", ".", "assertFalse", "(", "shardIdStolen", ".", "equals", "(", "\"1\"", ")", ")", ";", "}" ]
Verify that one activity is stolen from the highest loaded server when a server needs more than one lease and no expired leases are available.
[ "Verify", "that", "one", "activity", "is", "stolen", "from", "the", "highest", "loaded", "server", "when", "a", "server", "needs", "more", "than", "one", "lease", "and", "no", "expired", "leases", "are", "available", "." ]
[ "// Assert that one lease was stolen from baz.", "// Assert that it was one of baz's leases (shardId != 1)" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 510, 73, 287, 1435, 1216, 3519, 11730, 503, 288, 203, 3639, 7766, 44, 1303, 403, 1263, 2089, 273, 394, 7766, 44, 1303, 403, 1263, 12, 2508, 1957, 455, 1614, 1769, 203, 203, 3639, 2089, 18, 1918, 17746, 2932, 21, 3113, 315, 3215, 8863, 203, 3639, 364, 261, 474, 277, 273, 576, 31, 277, 1648, 1666, 31, 277, 27245, 288, 203, 5411, 514, 5820, 548, 273, 2144, 18, 10492, 12, 77, 1769, 203, 5411, 2089, 18, 1918, 17746, 12, 22630, 548, 16, 315, 70, 1561, 8863, 203, 3639, 289, 203, 203, 3639, 2089, 18, 3510, 5621, 203, 203, 3639, 368, 5452, 716, 1245, 11863, 1703, 384, 355, 275, 628, 29025, 18, 203, 3639, 1635, 32, 780, 16, 23175, 34, 9830, 1682, 3304, 273, 2089, 18, 22188, 7420, 340, 8213, 12, 88, 6388, 16, 404, 1769, 203, 203, 3639, 368, 5452, 716, 518, 1703, 1245, 434, 29025, 1807, 884, 3304, 261, 22630, 548, 480, 404, 13, 203, 3639, 514, 5820, 548, 510, 355, 275, 273, 9830, 1682, 3304, 18, 856, 694, 7675, 9838, 7675, 4285, 5621, 203, 3639, 5452, 18, 11231, 8381, 12, 22630, 548, 510, 355, 275, 18, 14963, 2932, 21, 7923, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 8553, 716, 1245, 5728, 353, 384, 355, 275, 628, 326, 9742, 4203, 1438, 1347, 279, 1438, 4260, 1898, 2353, 1245, 11863, 471, 1158, 203, 377, 380, 7708, 884, 3304, 854, 2319, 18, 10939, 30, 1059, 884, 3304, 16, 1438, 8431, 14798, 374, 16, 4653, 14798, 404, 16, 29025, 14798, 1381, 18, 203, 377, 380, 7010, 377, 380, 23077, 1410, 18654, 287, 628, 29025, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
972d39519d201a9c109582b94a073a614b516c2a
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/leases/dynamodb/DynamoDBLeaseTakerIntegrationTest.java
[ "Apache-2.0" ]
Java
testNoStealWhenExpiredLeases
null
@Test public void testNoStealWhenExpiredLeases() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); builder.withLease("1", null); for (int i = 2; i <= 4; i++) { String shardId = Integer.toString(i); builder.withLease(shardId, "bar"); } builder.build(); // Assert that the unowned lease was taken and we did not steal anything from bar builder.takeMutateAssert(taker, "1"); }
/** * Verify that stealing does not happen if LeaseTaker takes at least one expired lease, even if it needs more than * one. */
Verify that stealing does not happen if LeaseTaker takes at least one expired lease, even if it needs more than one.
[ "Verify", "that", "stealing", "does", "not", "happen", "if", "LeaseTaker", "takes", "at", "least", "one", "expired", "lease", "even", "if", "it", "needs", "more", "than", "one", "." ]
@Test public void testNoStealWhenExpiredLeases() throws LeasingException { TestHarnessBuilder builder = new TestHarnessBuilder(leaseRefresher); builder.withLease("1", null); for (int i = 2; i <= 4; i++) { String shardId = Integer.toString(i); builder.withLease(shardId, "bar"); } builder.build(); builder.takeMutateAssert(taker, "1"); }
[ "@", "Test", "public", "void", "testNoStealWhenExpiredLeases", "(", ")", "throws", "LeasingException", "{", "TestHarnessBuilder", "builder", "=", "new", "TestHarnessBuilder", "(", "leaseRefresher", ")", ";", "builder", ".", "withLease", "(", "\"1\"", ",", "null", ")", ";", "for", "(", "int", "i", "=", "2", ";", "i", "<=", "4", ";", "i", "++", ")", "{", "String", "shardId", "=", "Integer", ".", "toString", "(", "i", ")", ";", "builder", ".", "withLease", "(", "shardId", ",", "\"bar\"", ")", ";", "}", "builder", ".", "build", "(", ")", ";", "builder", ".", "takeMutateAssert", "(", "taker", ",", "\"1\"", ")", ";", "}" ]
Verify that stealing does not happen if LeaseTaker takes at least one expired lease, even if it needs more than one.
[ "Verify", "that", "stealing", "does", "not", "happen", "if", "LeaseTaker", "takes", "at", "least", "one", "expired", "lease", "even", "if", "it", "needs", "more", "than", "one", "." ]
[ "// Assert that the unowned lease was taken and we did not steal anything from bar" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 2279, 510, 73, 287, 9434, 10556, 1682, 3304, 1435, 1216, 3519, 11730, 503, 288, 203, 3639, 7766, 44, 1303, 403, 1263, 2089, 273, 394, 7766, 44, 1303, 403, 1263, 12, 2508, 1957, 455, 1614, 1769, 203, 203, 3639, 2089, 18, 1918, 17746, 2932, 21, 3113, 446, 1769, 203, 3639, 364, 261, 474, 277, 273, 576, 31, 277, 1648, 1059, 31, 277, 27245, 288, 203, 5411, 514, 5820, 548, 273, 2144, 18, 10492, 12, 77, 1769, 203, 5411, 2089, 18, 1918, 17746, 12, 22630, 548, 16, 315, 3215, 8863, 203, 3639, 289, 203, 203, 3639, 2089, 18, 3510, 5621, 203, 203, 3639, 368, 5452, 716, 326, 640, 995, 329, 11863, 1703, 9830, 471, 732, 5061, 486, 18654, 287, 6967, 628, 4653, 203, 3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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 8553, 716, 18654, 287, 310, 1552, 486, 5865, 309, 23175, 56, 6388, 5530, 622, 4520, 1245, 7708, 11863, 16, 5456, 309, 518, 4260, 1898, 2353, 203, 377, 380, 1245, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6c29fb8226f96ca434abdce32403d517d5c4442
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/metrics/CloudWatchPublisherRunnableTest.java
[ "Apache-2.0" ]
Java
runAndAssert
null
void runAndAssert(int startIndex, int count) { runnable.runOnce(); if (count > 0) { Mockito.verify(publisher).publishMetrics(data.subList(startIndex, startIndex + count)); } Mockito.verifyNoMoreInteractions(publisher); }
/** * Run one iteration of the runnable and assert that it called CloudWatch with count records beginning with * record startIndex, and no more than that. * * @param startIndex * @param count */
Run one iteration of the runnable and assert that it called CloudWatch with count records beginning with record startIndex, and no more than that. @param startIndex @param count
[ "Run", "one", "iteration", "of", "the", "runnable", "and", "assert", "that", "it", "called", "CloudWatch", "with", "count", "records", "beginning", "with", "record", "startIndex", "and", "no", "more", "than", "that", ".", "@param", "startIndex", "@param", "count" ]
void runAndAssert(int startIndex, int count) { runnable.runOnce(); if (count > 0) { Mockito.verify(publisher).publishMetrics(data.subList(startIndex, startIndex + count)); } Mockito.verifyNoMoreInteractions(publisher); }
[ "void", "runAndAssert", "(", "int", "startIndex", ",", "int", "count", ")", "{", "runnable", ".", "runOnce", "(", ")", ";", "if", "(", "count", ">", "0", ")", "{", "Mockito", ".", "verify", "(", "publisher", ")", ".", "publishMetrics", "(", "data", ".", "subList", "(", "startIndex", ",", "startIndex", "+", "count", ")", ")", ";", "}", "Mockito", ".", "verifyNoMoreInteractions", "(", "publisher", ")", ";", "}" ]
Run one iteration of the runnable and assert that it called CloudWatch with count records beginning with record startIndex, and no more than that.
[ "Run", "one", "iteration", "of", "the", "runnable", "and", "assert", "that", "it", "called", "CloudWatch", "with", "count", "records", "beginning", "with", "record", "startIndex", "and", "no", "more", "than", "that", "." ]
[]
[ { "param": "startIndex", "type": "int" }, { "param": "count", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "startIndex", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "count", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 918, 1086, 1876, 8213, 12, 474, 10588, 16, 509, 1056, 13, 288, 203, 5411, 14685, 18, 2681, 12212, 5621, 203, 203, 5411, 309, 261, 1883, 405, 374, 13, 288, 203, 7734, 7867, 11250, 18, 8705, 12, 26018, 2934, 6543, 5653, 12, 892, 18, 1717, 682, 12, 1937, 1016, 16, 10588, 397, 1056, 10019, 203, 5411, 289, 203, 203, 5411, 7867, 11250, 18, 8705, 2279, 7417, 2465, 4905, 12, 26018, 1769, 203, 3639, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 540, 380, 1939, 1245, 6532, 434, 326, 14685, 471, 1815, 716, 518, 2566, 17847, 598, 1056, 3853, 8435, 598, 203, 540, 380, 1409, 10588, 16, 471, 1158, 1898, 2353, 716, 18, 203, 540, 380, 7010, 540, 380, 632, 891, 10588, 203, 540, 380, 632, 891, 1056, 203, 540, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6c29fb8226f96ca434abdce32403d517d5c4442
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/metrics/CloudWatchPublisherRunnableTest.java
[ "Apache-2.0" ]
Java
testPublishOnFlushSize
null
@Test public void testPublishOnFlushSize() { harness.enqueueRandom(FLUSH_SIZE); harness.runAndAssertAllData(); }
/** * Enqueue a full batch of data. Without allowing time to pass, assert that the runnable sends all data. */
Enqueue a full batch of data. Without allowing time to pass, assert that the runnable sends all data.
[ "Enqueue", "a", "full", "batch", "of", "data", ".", "Without", "allowing", "time", "to", "pass", "assert", "that", "the", "runnable", "sends", "all", "data", "." ]
@Test public void testPublishOnFlushSize() { harness.enqueueRandom(FLUSH_SIZE); harness.runAndAssertAllData(); }
[ "@", "Test", "public", "void", "testPublishOnFlushSize", "(", ")", "{", "harness", ".", "enqueueRandom", "(", "FLUSH_SIZE", ")", ";", "harness", ".", "runAndAssertAllData", "(", ")", ";", "}" ]
Enqueue a full batch of data.
[ "Enqueue", "a", "full", "batch", "of", "data", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 6024, 1398, 8207, 1225, 1435, 288, 203, 3639, 366, 1303, 403, 18, 21798, 8529, 12, 42, 31959, 67, 4574, 1769, 203, 3639, 366, 1303, 403, 18, 2681, 1876, 8213, 1595, 751, 5621, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1374, 4000, 279, 1983, 2581, 434, 501, 18, 27287, 15632, 813, 358, 1342, 16, 1815, 716, 326, 14685, 9573, 777, 501, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6c29fb8226f96ca434abdce32403d517d5c4442
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/metrics/CloudWatchPublisherRunnableTest.java
[ "Apache-2.0" ]
Java
testWaitForBatchTimeout
null
@Test public void testWaitForBatchTimeout() { harness.enqueueRandom(1); harness.runAndAssert(0, 0); harness.passTime(MAX_BUFFER_TIME_MILLIS); harness.runAndAssertAllData(); harness.enqueueRandom(1); harness.runAndAssert(0, 0); harness.passTime(MAX_BUFFER_TIME_MILLIS); harness.runAndAssert(1, 1); }
/** * Enqueue 1 message. Without allowing time to pass, assert that the runnable sends nothing. * Pass MAX_BUFFER_TIME_MILLIS of time, then assert that the runnable sends all data. Enqueue another message. * Repeat timing/assertion pattern. */
Enqueue 1 message. Without allowing time to pass, assert that the runnable sends nothing. Pass MAX_BUFFER_TIME_MILLIS of time, then assert that the runnable sends all data. Enqueue another message. Repeat timing/assertion pattern.
[ "Enqueue", "1", "message", ".", "Without", "allowing", "time", "to", "pass", "assert", "that", "the", "runnable", "sends", "nothing", ".", "Pass", "MAX_BUFFER_TIME_MILLIS", "of", "time", "then", "assert", "that", "the", "runnable", "sends", "all", "data", ".", "Enqueue", "another", "message", ".", "Repeat", "timing", "/", "assertion", "pattern", "." ]
@Test public void testWaitForBatchTimeout() { harness.enqueueRandom(1); harness.runAndAssert(0, 0); harness.passTime(MAX_BUFFER_TIME_MILLIS); harness.runAndAssertAllData(); harness.enqueueRandom(1); harness.runAndAssert(0, 0); harness.passTime(MAX_BUFFER_TIME_MILLIS); harness.runAndAssert(1, 1); }
[ "@", "Test", "public", "void", "testWaitForBatchTimeout", "(", ")", "{", "harness", ".", "enqueueRandom", "(", "1", ")", ";", "harness", ".", "runAndAssert", "(", "0", ",", "0", ")", ";", "harness", ".", "passTime", "(", "MAX_BUFFER_TIME_MILLIS", ")", ";", "harness", ".", "runAndAssertAllData", "(", ")", ";", "harness", ".", "enqueueRandom", "(", "1", ")", ";", "harness", ".", "runAndAssert", "(", "0", ",", "0", ")", ";", "harness", ".", "passTime", "(", "MAX_BUFFER_TIME_MILLIS", ")", ";", "harness", ".", "runAndAssert", "(", "1", ",", "1", ")", ";", "}" ]
Enqueue 1 message.
[ "Enqueue", "1", "message", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 29321, 4497, 2694, 1435, 288, 203, 3639, 366, 1303, 403, 18, 21798, 8529, 12, 21, 1769, 203, 3639, 366, 1303, 403, 18, 2681, 1876, 8213, 12, 20, 16, 374, 1769, 203, 3639, 366, 1303, 403, 18, 5466, 950, 12, 6694, 67, 11302, 67, 4684, 67, 30816, 1769, 203, 3639, 366, 1303, 403, 18, 2681, 1876, 8213, 1595, 751, 5621, 203, 203, 3639, 366, 1303, 403, 18, 21798, 8529, 12, 21, 1769, 203, 3639, 366, 1303, 403, 18, 2681, 1876, 8213, 12, 20, 16, 374, 1769, 203, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1374, 4000, 404, 883, 18, 27287, 15632, 813, 358, 1342, 16, 1815, 716, 326, 14685, 9573, 5083, 18, 203, 377, 380, 10311, 4552, 67, 11302, 67, 4684, 67, 30816, 434, 813, 16, 1508, 1815, 716, 326, 14685, 9573, 777, 501, 18, 1374, 4000, 4042, 883, 18, 203, 377, 380, 20742, 15538, 19, 29104, 1936, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6c29fb8226f96ca434abdce32403d517d5c4442
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/metrics/CloudWatchPublisherRunnableTest.java
[ "Apache-2.0" ]
Java
testDrainQueue
null
@Test public void testDrainQueue() { int numBatches = 2; harness.enqueueRandom(FLUSH_SIZE * numBatches); harness.enqueueRandom(1); for (int i = 0; i < numBatches; i++) { harness.runAndAssert(i * FLUSH_SIZE, FLUSH_SIZE); } harness.runAndAssert(0, 0); harness.passTime(MAX_BUFFER_TIME_MILLIS); harness.runAndAssert(numBatches * FLUSH_SIZE, 1); }
/** * Enqueue two batches + 1 datum. Without allowing time to pass, assert that the runnable sends all but the last * datum. Pass MAX_BUFFER_TIME_MILLIS of time, then assert that the runnable sends the last datum. */
Enqueue two batches + 1 datum. Without allowing time to pass, assert that the runnable sends all but the last datum. Pass MAX_BUFFER_TIME_MILLIS of time, then assert that the runnable sends the last datum.
[ "Enqueue", "two", "batches", "+", "1", "datum", ".", "Without", "allowing", "time", "to", "pass", "assert", "that", "the", "runnable", "sends", "all", "but", "the", "last", "datum", ".", "Pass", "MAX_BUFFER_TIME_MILLIS", "of", "time", "then", "assert", "that", "the", "runnable", "sends", "the", "last", "datum", "." ]
@Test public void testDrainQueue() { int numBatches = 2; harness.enqueueRandom(FLUSH_SIZE * numBatches); harness.enqueueRandom(1); for (int i = 0; i < numBatches; i++) { harness.runAndAssert(i * FLUSH_SIZE, FLUSH_SIZE); } harness.runAndAssert(0, 0); harness.passTime(MAX_BUFFER_TIME_MILLIS); harness.runAndAssert(numBatches * FLUSH_SIZE, 1); }
[ "@", "Test", "public", "void", "testDrainQueue", "(", ")", "{", "int", "numBatches", "=", "2", ";", "harness", ".", "enqueueRandom", "(", "FLUSH_SIZE", "*", "numBatches", ")", ";", "harness", ".", "enqueueRandom", "(", "1", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "numBatches", ";", "i", "++", ")", "{", "harness", ".", "runAndAssert", "(", "i", "*", "FLUSH_SIZE", ",", "FLUSH_SIZE", ")", ";", "}", "harness", ".", "runAndAssert", "(", "0", ",", "0", ")", ";", "harness", ".", "passTime", "(", "MAX_BUFFER_TIME_MILLIS", ")", ";", "harness", ".", "runAndAssert", "(", "numBatches", "*", "FLUSH_SIZE", ",", "1", ")", ";", "}" ]
Enqueue two batches + 1 datum.
[ "Enqueue", "two", "batches", "+", "1", "datum", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 26896, 3183, 1435, 288, 203, 3639, 509, 818, 31584, 273, 576, 31, 203, 3639, 366, 1303, 403, 18, 21798, 8529, 12, 42, 31959, 67, 4574, 380, 818, 31584, 1769, 203, 3639, 366, 1303, 403, 18, 21798, 8529, 12, 21, 1769, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 818, 31584, 31, 277, 27245, 288, 203, 5411, 366, 1303, 403, 18, 2681, 1876, 8213, 12, 77, 380, 478, 31959, 67, 4574, 16, 478, 31959, 67, 4574, 1769, 203, 3639, 289, 203, 3639, 366, 1303, 403, 18, 2681, 1876, 8213, 12, 20, 16, 374, 1769, 203, 3639, 366, 1303, 403, 18, 5466, 950, 12, 6694, 67, 11302, 67, 4684, 67, 30816, 1769, 203, 3639, 366, 1303, 403, 18, 2681, 1876, 8213, 12, 2107, 31584, 380, 478, 31959, 67, 4574, 16, 404, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1374, 4000, 2795, 13166, 397, 404, 12059, 18, 27287, 15632, 813, 358, 1342, 16, 1815, 716, 326, 14685, 9573, 777, 1496, 326, 1142, 203, 377, 380, 12059, 18, 10311, 4552, 67, 11302, 67, 4684, 67, 30816, 434, 813, 16, 1508, 1815, 716, 326, 14685, 9573, 326, 1142, 12059, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6c29fb8226f96ca434abdce32403d517d5c4442
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/metrics/CloudWatchPublisherRunnableTest.java
[ "Apache-2.0" ]
Java
testShutdown
null
@Test public void testShutdown() { harness.enqueueRandom(FLUSH_SIZE + 1); harness.getRunnable().shutdown(); harness.runAndAssert(0, FLUSH_SIZE); Assert.assertFalse(harness.getRunnable().isShutdown()); harness.runAndAssert(FLUSH_SIZE, 1); Assert.assertTrue(harness.getRunnable().isShutdown()); }
/** * Enqueue BATCH_SIZE + 1 messages. Shutdown the runnable. Without passing time, assert that the runnable sends all * data and isShutdown() returns false until all data is sent. */
Enqueue BATCH_SIZE + 1 messages. Shutdown the runnable. Without passing time, assert that the runnable sends all data and isShutdown() returns false until all data is sent.
[ "Enqueue", "BATCH_SIZE", "+", "1", "messages", ".", "Shutdown", "the", "runnable", ".", "Without", "passing", "time", "assert", "that", "the", "runnable", "sends", "all", "data", "and", "isShutdown", "()", "returns", "false", "until", "all", "data", "is", "sent", "." ]
@Test public void testShutdown() { harness.enqueueRandom(FLUSH_SIZE + 1); harness.getRunnable().shutdown(); harness.runAndAssert(0, FLUSH_SIZE); Assert.assertFalse(harness.getRunnable().isShutdown()); harness.runAndAssert(FLUSH_SIZE, 1); Assert.assertTrue(harness.getRunnable().isShutdown()); }
[ "@", "Test", "public", "void", "testShutdown", "(", ")", "{", "harness", ".", "enqueueRandom", "(", "FLUSH_SIZE", "+", "1", ")", ";", "harness", ".", "getRunnable", "(", ")", ".", "shutdown", "(", ")", ";", "harness", ".", "runAndAssert", "(", "0", ",", "FLUSH_SIZE", ")", ";", "Assert", ".", "assertFalse", "(", "harness", ".", "getRunnable", "(", ")", ".", "isShutdown", "(", ")", ")", ";", "harness", ".", "runAndAssert", "(", "FLUSH_SIZE", ",", "1", ")", ";", "Assert", ".", "assertTrue", "(", "harness", ".", "getRunnable", "(", ")", ".", "isShutdown", "(", ")", ")", ";", "}" ]
Enqueue BATCH_SIZE + 1 messages.
[ "Enqueue", "BATCH_SIZE", "+", "1", "messages", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 10961, 1435, 288, 203, 3639, 366, 1303, 403, 18, 21798, 8529, 12, 42, 31959, 67, 4574, 397, 404, 1769, 203, 3639, 366, 1303, 403, 18, 588, 20013, 7675, 15132, 5621, 203, 203, 3639, 366, 1303, 403, 18, 2681, 1876, 8213, 12, 20, 16, 478, 31959, 67, 4574, 1769, 203, 3639, 5452, 18, 11231, 8381, 12, 76, 1303, 403, 18, 588, 20013, 7675, 291, 10961, 10663, 203, 203, 3639, 366, 1303, 403, 18, 2681, 1876, 8213, 12, 42, 31959, 67, 4574, 16, 404, 1769, 203, 3639, 5452, 18, 11231, 5510, 12, 76, 1303, 403, 18, 588, 20013, 7675, 291, 10961, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1374, 4000, 605, 5858, 67, 4574, 397, 404, 2743, 18, 17640, 326, 14685, 18, 27287, 9588, 813, 16, 1815, 716, 326, 14685, 9573, 777, 203, 377, 380, 501, 471, 353, 10961, 1435, 1135, 629, 3180, 777, 501, 353, 3271, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6c29fb8226f96ca434abdce32403d517d5c4442
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/metrics/CloudWatchPublisherRunnableTest.java
[ "Apache-2.0" ]
Java
testQueueFullDropData
null
@Test public void testQueueFullDropData() { int numRecords = MAX_QUEUE_SIZE + 1; harness.enqueueRandom(numRecords); harness.getRunnable().shutdown(); for (int i = 0; i < MAX_QUEUE_SIZE; i += FLUSH_SIZE) { harness.runAndAssert(i, Math.min(MAX_QUEUE_SIZE - i, FLUSH_SIZE)); } Assert.assertTrue(harness.getRunnable().isShutdown()); }
/** * Enqueue MAX_QUEUE_SIZE + 1 messages. Shutdown the runnable. Assert that the runnable sends all but the last * datum and is shut down afterwards. */
Enqueue MAX_QUEUE_SIZE + 1 messages. Shutdown the runnable. Assert that the runnable sends all but the last datum and is shut down afterwards.
[ "Enqueue", "MAX_QUEUE_SIZE", "+", "1", "messages", ".", "Shutdown", "the", "runnable", ".", "Assert", "that", "the", "runnable", "sends", "all", "but", "the", "last", "datum", "and", "is", "shut", "down", "afterwards", "." ]
@Test public void testQueueFullDropData() { int numRecords = MAX_QUEUE_SIZE + 1; harness.enqueueRandom(numRecords); harness.getRunnable().shutdown(); for (int i = 0; i < MAX_QUEUE_SIZE; i += FLUSH_SIZE) { harness.runAndAssert(i, Math.min(MAX_QUEUE_SIZE - i, FLUSH_SIZE)); } Assert.assertTrue(harness.getRunnable().isShutdown()); }
[ "@", "Test", "public", "void", "testQueueFullDropData", "(", ")", "{", "int", "numRecords", "=", "MAX_QUEUE_SIZE", "+", "1", ";", "harness", ".", "enqueueRandom", "(", "numRecords", ")", ";", "harness", ".", "getRunnable", "(", ")", ".", "shutdown", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "MAX_QUEUE_SIZE", ";", "i", "+=", "FLUSH_SIZE", ")", "{", "harness", ".", "runAndAssert", "(", "i", ",", "Math", ".", "min", "(", "MAX_QUEUE_SIZE", "-", "i", ",", "FLUSH_SIZE", ")", ")", ";", "}", "Assert", ".", "assertTrue", "(", "harness", ".", "getRunnable", "(", ")", ".", "isShutdown", "(", ")", ")", ";", "}" ]
Enqueue MAX_QUEUE_SIZE + 1 messages.
[ "Enqueue", "MAX_QUEUE_SIZE", "+", "1", "messages", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 3183, 5080, 7544, 751, 1435, 288, 203, 3639, 509, 818, 6499, 273, 4552, 67, 19533, 67, 4574, 397, 404, 31, 203, 3639, 366, 1303, 403, 18, 21798, 8529, 12, 2107, 6499, 1769, 203, 3639, 366, 1303, 403, 18, 588, 20013, 7675, 15132, 5621, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 4552, 67, 19533, 67, 4574, 31, 277, 1011, 478, 31959, 67, 4574, 13, 288, 203, 5411, 366, 1303, 403, 18, 2681, 1876, 8213, 12, 77, 16, 2361, 18, 1154, 12, 6694, 67, 19533, 67, 4574, 300, 277, 16, 478, 31959, 67, 4574, 10019, 203, 3639, 289, 203, 203, 3639, 5452, 18, 11231, 5510, 12, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1374, 4000, 4552, 67, 19533, 67, 4574, 397, 404, 2743, 18, 17640, 326, 14685, 18, 5452, 716, 326, 14685, 9573, 777, 1496, 326, 1142, 203, 377, 380, 12059, 471, 353, 9171, 2588, 23838, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
603558d0b15888eaa446a1f20c1c90b003d505a0
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/metrics/MetricAccumulatingQueue.java
[ "Apache-2.0" ]
Java
drain
null
public synchronized List<MetricDatumWithKey<KeyType>> drain(int maxItems) { List<MetricDatumWithKey<KeyType>> drainedItems = new ArrayList<>(maxItems); queue.drainTo(drainedItems, maxItems); drainedItems.forEach(datumWithKey -> map.remove(datumWithKey.key)); return drainedItems; }
/** * @param maxItems number of items to remove from the queue. * @return a list of MetricDatums that are no longer contained within the queue or map. */
@param maxItems number of items to remove from the queue. @return a list of MetricDatums that are no longer contained within the queue or map.
[ "@param", "maxItems", "number", "of", "items", "to", "remove", "from", "the", "queue", ".", "@return", "a", "list", "of", "MetricDatums", "that", "are", "no", "longer", "contained", "within", "the", "queue", "or", "map", "." ]
public synchronized List<MetricDatumWithKey<KeyType>> drain(int maxItems) { List<MetricDatumWithKey<KeyType>> drainedItems = new ArrayList<>(maxItems); queue.drainTo(drainedItems, maxItems); drainedItems.forEach(datumWithKey -> map.remove(datumWithKey.key)); return drainedItems; }
[ "public", "synchronized", "List", "<", "MetricDatumWithKey", "<", "KeyType", ">", ">", "drain", "(", "int", "maxItems", ")", "{", "List", "<", "MetricDatumWithKey", "<", "KeyType", ">", ">", "drainedItems", "=", "new", "ArrayList", "<", ">", "(", "maxItems", ")", ";", "queue", ".", "drainTo", "(", "drainedItems", ",", "maxItems", ")", ";", "drainedItems", ".", "forEach", "(", "datumWithKey", "->", "map", ".", "remove", "(", "datumWithKey", ".", "key", ")", ")", ";", "return", "drainedItems", ";", "}" ]
@param maxItems number of items to remove from the queue.
[ "@param", "maxItems", "number", "of", "items", "to", "remove", "from", "the", "queue", "." ]
[]
[ { "param": "maxItems", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "maxItems", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 3852, 987, 32, 5396, 18268, 1190, 653, 32, 22100, 9778, 15427, 12, 474, 943, 3126, 13, 288, 203, 3639, 987, 32, 5396, 18268, 1190, 653, 32, 22100, 9778, 302, 354, 1920, 3126, 273, 394, 2407, 29667, 12, 1896, 3126, 1769, 203, 3639, 2389, 18, 72, 7596, 774, 12, 27224, 1920, 3126, 16, 943, 3126, 1769, 203, 3639, 302, 354, 1920, 3126, 18, 1884, 3442, 12, 3404, 379, 1190, 653, 317, 852, 18, 4479, 12, 3404, 379, 1190, 653, 18, 856, 10019, 203, 3639, 327, 302, 354, 1920, 3126, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 943, 3126, 1300, 434, 1516, 358, 1206, 628, 326, 2389, 18, 203, 377, 380, 632, 2463, 279, 666, 434, 7279, 18268, 87, 716, 854, 1158, 7144, 7542, 3470, 326, 2389, 578, 852, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
603558d0b15888eaa446a1f20c1c90b003d505a0
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/metrics/MetricAccumulatingQueue.java
[ "Apache-2.0" ]
Java
offer
null
public synchronized boolean offer(KeyType key, MetricDatum datum) { MetricDatumWithKey<KeyType> metricDatumWithKey = map.get(key); if (metricDatumWithKey == null) { metricDatumWithKey = new MetricDatumWithKey<>(key, datum); boolean offered = queue.offer(metricDatumWithKey); if (offered) { map.put(key, metricDatumWithKey); } return offered; } else { accumulate(metricDatumWithKey, datum); return true; } }
/** * We use a queue and a map in this method. The reason for this is because, the queue will keep our metrics in * FIFO order and the map will provide us with constant time lookup to get the appropriate MetricDatum. * * @param key metric key to be inserted into queue * @param datum metric to be inserted into queue * @return a boolean depending on whether the datum was inserted into the queue */
We use a queue and a map in this method. The reason for this is because, the queue will keep our metrics in FIFO order and the map will provide us with constant time lookup to get the appropriate MetricDatum. @param key metric key to be inserted into queue @param datum metric to be inserted into queue @return a boolean depending on whether the datum was inserted into the queue
[ "We", "use", "a", "queue", "and", "a", "map", "in", "this", "method", ".", "The", "reason", "for", "this", "is", "because", "the", "queue", "will", "keep", "our", "metrics", "in", "FIFO", "order", "and", "the", "map", "will", "provide", "us", "with", "constant", "time", "lookup", "to", "get", "the", "appropriate", "MetricDatum", ".", "@param", "key", "metric", "key", "to", "be", "inserted", "into", "queue", "@param", "datum", "metric", "to", "be", "inserted", "into", "queue", "@return", "a", "boolean", "depending", "on", "whether", "the", "datum", "was", "inserted", "into", "the", "queue" ]
public synchronized boolean offer(KeyType key, MetricDatum datum) { MetricDatumWithKey<KeyType> metricDatumWithKey = map.get(key); if (metricDatumWithKey == null) { metricDatumWithKey = new MetricDatumWithKey<>(key, datum); boolean offered = queue.offer(metricDatumWithKey); if (offered) { map.put(key, metricDatumWithKey); } return offered; } else { accumulate(metricDatumWithKey, datum); return true; } }
[ "public", "synchronized", "boolean", "offer", "(", "KeyType", "key", ",", "MetricDatum", "datum", ")", "{", "MetricDatumWithKey", "<", "KeyType", ">", "metricDatumWithKey", "=", "map", ".", "get", "(", "key", ")", ";", "if", "(", "metricDatumWithKey", "==", "null", ")", "{", "metricDatumWithKey", "=", "new", "MetricDatumWithKey", "<", ">", "(", "key", ",", "datum", ")", ";", "boolean", "offered", "=", "queue", ".", "offer", "(", "metricDatumWithKey", ")", ";", "if", "(", "offered", ")", "{", "map", ".", "put", "(", "key", ",", "metricDatumWithKey", ")", ";", "}", "return", "offered", ";", "}", "else", "{", "accumulate", "(", "metricDatumWithKey", ",", "datum", ")", ";", "return", "true", ";", "}", "}" ]
We use a queue and a map in this method.
[ "We", "use", "a", "queue", "and", "a", "map", "in", "this", "method", "." ]
[]
[ { "param": "key", "type": "KeyType" }, { "param": "datum", "type": "MetricDatum" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "key", "type": "KeyType", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "datum", "type": "MetricDatum", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 3852, 1250, 10067, 12, 22100, 498, 16, 7279, 18268, 12059, 13, 288, 203, 3639, 7279, 18268, 1190, 653, 32, 22100, 34, 3999, 18268, 1190, 653, 273, 852, 18, 588, 12, 856, 1769, 203, 203, 3639, 309, 261, 6899, 18268, 1190, 653, 422, 446, 13, 288, 203, 5411, 3999, 18268, 1190, 653, 273, 394, 7279, 18268, 1190, 653, 29667, 12, 856, 16, 12059, 1769, 203, 5411, 1250, 10067, 329, 273, 2389, 18, 23322, 12, 6899, 18268, 1190, 653, 1769, 203, 5411, 309, 261, 23322, 329, 13, 288, 203, 7734, 852, 18, 458, 12, 856, 16, 3999, 18268, 1190, 653, 1769, 203, 5411, 289, 203, 203, 5411, 327, 10067, 329, 31, 203, 3639, 289, 469, 288, 203, 5411, 21757, 12, 6899, 18268, 1190, 653, 16, 12059, 1769, 203, 5411, 327, 638, 31, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1660, 999, 279, 2389, 471, 279, 852, 316, 333, 707, 18, 1021, 3971, 364, 333, 353, 2724, 16, 326, 2389, 903, 3455, 3134, 4309, 316, 203, 377, 380, 4011, 3313, 1353, 471, 326, 852, 903, 5615, 584, 598, 5381, 813, 3689, 358, 336, 326, 5505, 7279, 18268, 18, 203, 377, 380, 7010, 377, 380, 632, 891, 498, 3999, 498, 358, 506, 9564, 1368, 2389, 203, 377, 380, 632, 891, 12059, 3999, 358, 506, 9564, 1368, 2389, 203, 377, 380, 632, 2463, 279, 1250, 8353, 603, 2856, 326, 12059, 1703, 9564, 1368, 326, 2389, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
aeb40b45ae6b69e7f025ef65919e771bec024566
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/metrics/CloudWatchPublisherRunnable.java
[ "Apache-2.0" ]
Java
enqueue
null
public void enqueue(Collection<MetricDatumWithKey<CloudWatchMetricKey>> data) { synchronized (queue) { if (shuttingDown) { log.warn("Dropping metrics {} because CloudWatchPublisherRunnable is shutting down.", data); return; } if (log.isDebugEnabled()) { log.debug("Enqueueing {} datums for publication", data.size()); } for (MetricDatumWithKey<CloudWatchMetricKey> datumWithKey : data) { if (!queue.offer(datumWithKey.key, datumWithKey.datum)) { log.warn("Metrics queue full - dropping metric {}", datumWithKey.datum); } } // If this is the first enqueue, start buffering from now. if (lastFlushTime == Long.MAX_VALUE) { lastFlushTime = getTime(); } queue.notify(); } }
/** * Enqueues metric data for publication. * * @param data collection of MetricDatum to enqueue */
Enqueues metric data for publication. @param data collection of MetricDatum to enqueue
[ "Enqueues", "metric", "data", "for", "publication", ".", "@param", "data", "collection", "of", "MetricDatum", "to", "enqueue" ]
public void enqueue(Collection<MetricDatumWithKey<CloudWatchMetricKey>> data) { synchronized (queue) { if (shuttingDown) { log.warn("Dropping metrics {} because CloudWatchPublisherRunnable is shutting down.", data); return; } if (log.isDebugEnabled()) { log.debug("Enqueueing {} datums for publication", data.size()); } for (MetricDatumWithKey<CloudWatchMetricKey> datumWithKey : data) { if (!queue.offer(datumWithKey.key, datumWithKey.datum)) { log.warn("Metrics queue full - dropping metric {}", datumWithKey.datum); } } if (lastFlushTime == Long.MAX_VALUE) { lastFlushTime = getTime(); } queue.notify(); } }
[ "public", "void", "enqueue", "(", "Collection", "<", "MetricDatumWithKey", "<", "CloudWatchMetricKey", ">", ">", "data", ")", "{", "synchronized", "(", "queue", ")", "{", "if", "(", "shuttingDown", ")", "{", "log", ".", "warn", "(", "\"Dropping metrics {} because CloudWatchPublisherRunnable is shutting down.\"", ",", "data", ")", ";", "return", ";", "}", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "\"Enqueueing {} datums for publication\"", ",", "data", ".", "size", "(", ")", ")", ";", "}", "for", "(", "MetricDatumWithKey", "<", "CloudWatchMetricKey", ">", "datumWithKey", ":", "data", ")", "{", "if", "(", "!", "queue", ".", "offer", "(", "datumWithKey", ".", "key", ",", "datumWithKey", ".", "datum", ")", ")", "{", "log", ".", "warn", "(", "\"Metrics queue full - dropping metric {}\"", ",", "datumWithKey", ".", "datum", ")", ";", "}", "}", "if", "(", "lastFlushTime", "==", "Long", ".", "MAX_VALUE", ")", "{", "lastFlushTime", "=", "getTime", "(", ")", ";", "}", "queue", ".", "notify", "(", ")", ";", "}", "}" ]
Enqueues metric data for publication.
[ "Enqueues", "metric", "data", "for", "publication", "." ]
[ "// If this is the first enqueue, start buffering from now." ]
[ { "param": "data", "type": "Collection<MetricDatumWithKey<CloudWatchMetricKey>>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "data", "type": "Collection<MetricDatumWithKey<CloudWatchMetricKey>>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 12850, 12, 2532, 32, 5396, 18268, 1190, 653, 32, 30523, 5396, 653, 9778, 501, 13, 288, 203, 3639, 3852, 261, 4000, 13, 288, 203, 5411, 309, 261, 674, 25387, 4164, 13, 288, 203, 7734, 613, 18, 8935, 2932, 7544, 1382, 4309, 2618, 2724, 17847, 15960, 20013, 353, 24376, 2588, 1199, 16, 501, 1769, 203, 7734, 327, 31, 203, 5411, 289, 203, 203, 5411, 309, 261, 1330, 18, 291, 2829, 1526, 10756, 288, 203, 7734, 613, 18, 4148, 2932, 25327, 310, 2618, 12059, 87, 364, 20574, 3113, 501, 18, 1467, 10663, 203, 5411, 289, 203, 203, 5411, 364, 261, 5396, 18268, 1190, 653, 32, 30523, 5396, 653, 34, 12059, 1190, 653, 294, 501, 13, 288, 203, 7734, 309, 16051, 4000, 18, 23322, 12, 3404, 379, 1190, 653, 18, 856, 16, 12059, 1190, 653, 18, 3404, 379, 3719, 288, 203, 10792, 613, 18, 8935, 2932, 5653, 2389, 1983, 300, 3640, 1382, 3999, 3728, 16, 12059, 1190, 653, 18, 3404, 379, 1769, 203, 7734, 289, 203, 5411, 289, 203, 203, 5411, 368, 971, 333, 353, 326, 1122, 12850, 16, 787, 25056, 628, 2037, 18, 203, 5411, 309, 261, 2722, 8207, 950, 422, 3407, 18, 6694, 67, 4051, 13, 288, 203, 7734, 1142, 8207, 950, 273, 6135, 5621, 203, 5411, 289, 203, 203, 5411, 2389, 18, 12336, 5621, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1374, 18924, 3999, 501, 364, 20574, 18, 203, 377, 380, 7010, 377, 380, 632, 891, 501, 1849, 434, 7279, 18268, 358, 12850, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
18bba74245497e2121eaabbb31bf9724b3ef3242
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/metrics/MetricAccumulatingQueueTest.java
[ "Apache-2.0" ]
Java
testAccumulation
null
@Test public void testAccumulation() { Collection<Dimension> dimensionsA = Collections.singleton(dim("name","a")); Collection<Dimension> dimensionsB = Collections.singleton(dim("name","b")); String keyA = "a"; String keyB = "b"; MetricDatum datum1 = TestHelper.constructDatum(keyA, StandardUnit.COUNT, 10, 5, 15, 2).toBuilder().dimensions(dimensionsA).build(); queue.offer(new CloudWatchMetricKey(datum1), datum1); MetricDatum datum2 = TestHelper.constructDatum(keyA, StandardUnit.COUNT, 1, 1, 2, 2).toBuilder().dimensions(dimensionsA).build(); queue.offer(new CloudWatchMetricKey(datum2), datum2); MetricDatum datum3 = TestHelper.constructDatum(keyA, StandardUnit.COUNT, 1, 1, 2, 2).toBuilder().dimensions(dimensionsB).build(); queue.offer(new CloudWatchMetricKey(datum3), datum3); MetricDatum datum4 = TestHelper.constructDatum(keyA, StandardUnit.COUNT, 1, 1, 2, 2); queue.offer(new CloudWatchMetricKey(datum4), datum4); queue.offer(new CloudWatchMetricKey(datum4), datum4); MetricDatum datum5 = TestHelper.constructDatum(keyB, StandardUnit.COUNT, 100, 10, 110, 2).toBuilder().dimensions(dimensionsA).build(); queue.offer(new CloudWatchMetricKey(datum5), datum5); Assert.assertEquals(4, queue.size()); List<MetricDatumWithKey<CloudWatchMetricKey>> items = queue.drain(4); Assert.assertEquals(items.get(0).datum, TestHelper.constructDatum(keyA, StandardUnit.COUNT, 10, 1, 17, 4) .toBuilder().dimensions(dimensionsA).build()); Assert.assertEquals(items.get(1).datum, datum3); Assert.assertEquals(items.get(2).datum, TestHelper.constructDatum(keyA, StandardUnit.COUNT, 1, 1, 4, 4)); Assert.assertEquals(items.get(3).datum, TestHelper.constructDatum(keyB, StandardUnit.COUNT, 100, 10, 110, 2) .toBuilder().dimensions(dimensionsA).build()); }
/* * Test whether the MetricDatums offered into the queue will accumulate data based on the same metricName and * output those datums with the correctly accumulated output. */
Test whether the MetricDatums offered into the queue will accumulate data based on the same metricName and output those datums with the correctly accumulated output.
[ "Test", "whether", "the", "MetricDatums", "offered", "into", "the", "queue", "will", "accumulate", "data", "based", "on", "the", "same", "metricName", "and", "output", "those", "datums", "with", "the", "correctly", "accumulated", "output", "." ]
@Test public void testAccumulation() { Collection<Dimension> dimensionsA = Collections.singleton(dim("name","a")); Collection<Dimension> dimensionsB = Collections.singleton(dim("name","b")); String keyA = "a"; String keyB = "b"; MetricDatum datum1 = TestHelper.constructDatum(keyA, StandardUnit.COUNT, 10, 5, 15, 2).toBuilder().dimensions(dimensionsA).build(); queue.offer(new CloudWatchMetricKey(datum1), datum1); MetricDatum datum2 = TestHelper.constructDatum(keyA, StandardUnit.COUNT, 1, 1, 2, 2).toBuilder().dimensions(dimensionsA).build(); queue.offer(new CloudWatchMetricKey(datum2), datum2); MetricDatum datum3 = TestHelper.constructDatum(keyA, StandardUnit.COUNT, 1, 1, 2, 2).toBuilder().dimensions(dimensionsB).build(); queue.offer(new CloudWatchMetricKey(datum3), datum3); MetricDatum datum4 = TestHelper.constructDatum(keyA, StandardUnit.COUNT, 1, 1, 2, 2); queue.offer(new CloudWatchMetricKey(datum4), datum4); queue.offer(new CloudWatchMetricKey(datum4), datum4); MetricDatum datum5 = TestHelper.constructDatum(keyB, StandardUnit.COUNT, 100, 10, 110, 2).toBuilder().dimensions(dimensionsA).build(); queue.offer(new CloudWatchMetricKey(datum5), datum5); Assert.assertEquals(4, queue.size()); List<MetricDatumWithKey<CloudWatchMetricKey>> items = queue.drain(4); Assert.assertEquals(items.get(0).datum, TestHelper.constructDatum(keyA, StandardUnit.COUNT, 10, 1, 17, 4) .toBuilder().dimensions(dimensionsA).build()); Assert.assertEquals(items.get(1).datum, datum3); Assert.assertEquals(items.get(2).datum, TestHelper.constructDatum(keyA, StandardUnit.COUNT, 1, 1, 4, 4)); Assert.assertEquals(items.get(3).datum, TestHelper.constructDatum(keyB, StandardUnit.COUNT, 100, 10, 110, 2) .toBuilder().dimensions(dimensionsA).build()); }
[ "@", "Test", "public", "void", "testAccumulation", "(", ")", "{", "Collection", "<", "Dimension", ">", "dimensionsA", "=", "Collections", ".", "singleton", "(", "dim", "(", "\"name\"", ",", "\"a\"", ")", ")", ";", "Collection", "<", "Dimension", ">", "dimensionsB", "=", "Collections", ".", "singleton", "(", "dim", "(", "\"name\"", ",", "\"b\"", ")", ")", ";", "String", "keyA", "=", "\"a\"", ";", "String", "keyB", "=", "\"b\"", ";", "MetricDatum", "datum1", "=", "TestHelper", ".", "constructDatum", "(", "keyA", ",", "StandardUnit", ".", "COUNT", ",", "10", ",", "5", ",", "15", ",", "2", ")", ".", "toBuilder", "(", ")", ".", "dimensions", "(", "dimensionsA", ")", ".", "build", "(", ")", ";", "queue", ".", "offer", "(", "new", "CloudWatchMetricKey", "(", "datum1", ")", ",", "datum1", ")", ";", "MetricDatum", "datum2", "=", "TestHelper", ".", "constructDatum", "(", "keyA", ",", "StandardUnit", ".", "COUNT", ",", "1", ",", "1", ",", "2", ",", "2", ")", ".", "toBuilder", "(", ")", ".", "dimensions", "(", "dimensionsA", ")", ".", "build", "(", ")", ";", "queue", ".", "offer", "(", "new", "CloudWatchMetricKey", "(", "datum2", ")", ",", "datum2", ")", ";", "MetricDatum", "datum3", "=", "TestHelper", ".", "constructDatum", "(", "keyA", ",", "StandardUnit", ".", "COUNT", ",", "1", ",", "1", ",", "2", ",", "2", ")", ".", "toBuilder", "(", ")", ".", "dimensions", "(", "dimensionsB", ")", ".", "build", "(", ")", ";", "queue", ".", "offer", "(", "new", "CloudWatchMetricKey", "(", "datum3", ")", ",", "datum3", ")", ";", "MetricDatum", "datum4", "=", "TestHelper", ".", "constructDatum", "(", "keyA", ",", "StandardUnit", ".", "COUNT", ",", "1", ",", "1", ",", "2", ",", "2", ")", ";", "queue", ".", "offer", "(", "new", "CloudWatchMetricKey", "(", "datum4", ")", ",", "datum4", ")", ";", "queue", ".", "offer", "(", "new", "CloudWatchMetricKey", "(", "datum4", ")", ",", "datum4", ")", ";", "MetricDatum", "datum5", "=", "TestHelper", ".", "constructDatum", "(", "keyB", ",", "StandardUnit", ".", "COUNT", ",", "100", ",", "10", ",", "110", ",", "2", ")", ".", "toBuilder", "(", ")", ".", "dimensions", "(", "dimensionsA", ")", ".", "build", "(", ")", ";", "queue", ".", "offer", "(", "new", "CloudWatchMetricKey", "(", "datum5", ")", ",", "datum5", ")", ";", "Assert", ".", "assertEquals", "(", "4", ",", "queue", ".", "size", "(", ")", ")", ";", "List", "<", "MetricDatumWithKey", "<", "CloudWatchMetricKey", ">", ">", "items", "=", "queue", ".", "drain", "(", "4", ")", ";", "Assert", ".", "assertEquals", "(", "items", ".", "get", "(", "0", ")", ".", "datum", ",", "TestHelper", ".", "constructDatum", "(", "keyA", ",", "StandardUnit", ".", "COUNT", ",", "10", ",", "1", ",", "17", ",", "4", ")", ".", "toBuilder", "(", ")", ".", "dimensions", "(", "dimensionsA", ")", ".", "build", "(", ")", ")", ";", "Assert", ".", "assertEquals", "(", "items", ".", "get", "(", "1", ")", ".", "datum", ",", "datum3", ")", ";", "Assert", ".", "assertEquals", "(", "items", ".", "get", "(", "2", ")", ".", "datum", ",", "TestHelper", ".", "constructDatum", "(", "keyA", ",", "StandardUnit", ".", "COUNT", ",", "1", ",", "1", ",", "4", ",", "4", ")", ")", ";", "Assert", ".", "assertEquals", "(", "items", ".", "get", "(", "3", ")", ".", "datum", ",", "TestHelper", ".", "constructDatum", "(", "keyB", ",", "StandardUnit", ".", "COUNT", ",", "100", ",", "10", ",", "110", ",", "2", ")", ".", "toBuilder", "(", ")", ".", "dimensions", "(", "dimensionsA", ")", ".", "build", "(", ")", ")", ";", "}" ]
Test whether the MetricDatums offered into the queue will accumulate data based on the same metricName and output those datums with the correctly accumulated output.
[ "Test", "whether", "the", "MetricDatums", "offered", "into", "the", "queue", "will", "accumulate", "data", "based", "on", "the", "same", "metricName", "and", "output", "those", "datums", "with", "the", "correctly", "accumulated", "output", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 8973, 5283, 367, 1435, 288, 203, 3639, 2200, 32, 8611, 34, 5769, 37, 273, 5737, 18, 24487, 12, 3509, 2932, 529, 15937, 69, 7923, 1769, 203, 3639, 2200, 32, 8611, 34, 5769, 38, 273, 5737, 18, 24487, 12, 3509, 2932, 529, 15937, 70, 7923, 1769, 203, 3639, 514, 498, 37, 273, 315, 69, 14432, 203, 3639, 514, 498, 38, 273, 315, 70, 14432, 203, 203, 3639, 7279, 18268, 12059, 21, 273, 203, 7734, 7766, 2276, 18, 10062, 18268, 12, 856, 37, 16, 8263, 2802, 18, 7240, 16, 1728, 16, 1381, 16, 4711, 16, 576, 2934, 869, 1263, 7675, 14797, 12, 14797, 37, 2934, 3510, 5621, 203, 3639, 2389, 18, 23322, 12, 2704, 17847, 5396, 653, 12, 3404, 379, 21, 3631, 12059, 21, 1769, 203, 3639, 7279, 18268, 12059, 22, 273, 203, 7734, 7766, 2276, 18, 10062, 18268, 12, 856, 37, 16, 8263, 2802, 18, 7240, 16, 404, 16, 404, 16, 576, 16, 576, 2934, 869, 1263, 7675, 14797, 12, 14797, 37, 2934, 3510, 5621, 203, 3639, 2389, 18, 23322, 12, 2704, 17847, 5396, 653, 12, 3404, 379, 22, 3631, 12059, 22, 1769, 203, 203, 3639, 7279, 18268, 12059, 23, 273, 203, 7734, 7766, 2276, 18, 10062, 18268, 12, 856, 37, 16, 8263, 2802, 18, 7240, 16, 404, 16, 404, 16, 576, 16, 576, 2934, 869, 1263, 7675, 14797, 12, 14797, 38, 2934, 3510, 5621, 203, 3639, 2389, 18, 23322, 12, 2704, 17847, 5396, 653, 12, 3404, 379, 23, 3631, 12059, 23, 1769, 203, 203, 3639, 7279, 18268, 12059, 24, 273, 7766, 2276, 18, 10062, 18268, 12, 856, 37, 16, 8263, 2802, 18, 7240, 16, 404, 16, 404, 16, 576, 16, 576, 1769, 203, 3639, 2389, 18, 23322, 12, 2704, 17847, 5396, 653, 12, 3404, 379, 24, 3631, 12059, 24, 1769, 203, 3639, 2389, 18, 23322, 12, 2704, 17847, 5396, 653, 12, 3404, 379, 24, 3631, 12059, 24, 1769, 203, 203, 3639, 7279, 18268, 12059, 25, 273, 203, 7734, 7766, 2276, 18, 10062, 18268, 12, 856, 38, 16, 8263, 2802, 18, 7240, 16, 2130, 16, 1728, 16, 20168, 16, 576, 2934, 869, 1263, 7675, 14797, 12, 14797, 37, 2934, 3510, 5621, 203, 3639, 2389, 18, 23322, 12, 2704, 17847, 5396, 653, 12, 3404, 379, 25, 3631, 12059, 25, 1769, 203, 203, 3639, 5452, 18, 11231, 8867, 12, 24, 16, 2389, 18, 1467, 10663, 203, 3639, 987, 32, 5396, 18268, 1190, 653, 32, 30523, 5396, 653, 9778, 1516, 273, 2389, 18, 72, 7596, 12, 24, 1769, 203, 203, 3639, 5452, 18, 11231, 8867, 12, 3319, 18, 588, 12, 20, 2934, 3404, 379, 16, 7766, 2276, 18, 10062, 18268, 12, 856, 37, 16, 8263, 2802, 18, 7240, 16, 1728, 16, 404, 16, 8043, 16, 1059, 13, 203, 7734, 263, 869, 1263, 7675, 14797, 12, 14797, 37, 2934, 3510, 10663, 203, 3639, 5452, 18, 11231, 8867, 12, 3319, 18, 588, 12, 21, 2934, 3404, 379, 16, 12059, 23, 1769, 203, 3639, 5452, 18, 11231, 8867, 12, 3319, 18, 588, 12, 22, 2934, 3404, 379, 16, 7766, 2276, 18, 10062, 18268, 12, 856, 37, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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, 7010, 377, 380, 876, 5348, 12059, 87, 598, 326, 8783, 24893, 876, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
18bba74245497e2121eaabbb31bf9724b3ef3242
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/test/java/software/amazon/kinesis/metrics/MetricAccumulatingQueueTest.java
[ "Apache-2.0" ]
Java
testDrop
null
@Test public void testDrop() { for (int i = 0; i < MAX_QUEUE_SIZE; i++) { MetricDatum datum = TestHelper.constructDatum(Integer.toString(i), StandardUnit.COUNT, 1, 1, 2, 2); CloudWatchMetricKey key = new CloudWatchMetricKey(datum); Assert.assertTrue(queue.offer(key, datum)); } MetricDatum datum = TestHelper.constructDatum("foo", StandardUnit.COUNT, 1, 1, 2, 2); Assert.assertFalse(queue.offer(new CloudWatchMetricKey(datum), datum)); Assert.assertEquals(MAX_QUEUE_SIZE, queue.size()); }
/* * Test that the number of MetricDatum that can be added to our queue is capped at the MAX_QUEUE_SIZE. * Therefore, any datums added to the queue that is greater than the capacity of our queue will be dropped. */
Test that the number of MetricDatum that can be added to our queue is capped at the MAX_QUEUE_SIZE. Therefore, any datums added to the queue that is greater than the capacity of our queue will be dropped.
[ "Test", "that", "the", "number", "of", "MetricDatum", "that", "can", "be", "added", "to", "our", "queue", "is", "capped", "at", "the", "MAX_QUEUE_SIZE", ".", "Therefore", "any", "datums", "added", "to", "the", "queue", "that", "is", "greater", "than", "the", "capacity", "of", "our", "queue", "will", "be", "dropped", "." ]
@Test public void testDrop() { for (int i = 0; i < MAX_QUEUE_SIZE; i++) { MetricDatum datum = TestHelper.constructDatum(Integer.toString(i), StandardUnit.COUNT, 1, 1, 2, 2); CloudWatchMetricKey key = new CloudWatchMetricKey(datum); Assert.assertTrue(queue.offer(key, datum)); } MetricDatum datum = TestHelper.constructDatum("foo", StandardUnit.COUNT, 1, 1, 2, 2); Assert.assertFalse(queue.offer(new CloudWatchMetricKey(datum), datum)); Assert.assertEquals(MAX_QUEUE_SIZE, queue.size()); }
[ "@", "Test", "public", "void", "testDrop", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "MAX_QUEUE_SIZE", ";", "i", "++", ")", "{", "MetricDatum", "datum", "=", "TestHelper", ".", "constructDatum", "(", "Integer", ".", "toString", "(", "i", ")", ",", "StandardUnit", ".", "COUNT", ",", "1", ",", "1", ",", "2", ",", "2", ")", ";", "CloudWatchMetricKey", "key", "=", "new", "CloudWatchMetricKey", "(", "datum", ")", ";", "Assert", ".", "assertTrue", "(", "queue", ".", "offer", "(", "key", ",", "datum", ")", ")", ";", "}", "MetricDatum", "datum", "=", "TestHelper", ".", "constructDatum", "(", "\"foo\"", ",", "StandardUnit", ".", "COUNT", ",", "1", ",", "1", ",", "2", ",", "2", ")", ";", "Assert", ".", "assertFalse", "(", "queue", ".", "offer", "(", "new", "CloudWatchMetricKey", "(", "datum", ")", ",", "datum", ")", ")", ";", "Assert", ".", "assertEquals", "(", "MAX_QUEUE_SIZE", ",", "queue", ".", "size", "(", ")", ")", ";", "}" ]
Test that the number of MetricDatum that can be added to our queue is capped at the MAX_QUEUE_SIZE.
[ "Test", "that", "the", "number", "of", "MetricDatum", "that", "can", "be", "added", "to", "our", "queue", "is", "capped", "at", "the", "MAX_QUEUE_SIZE", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 7544, 1435, 288, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 4552, 67, 19533, 67, 4574, 31, 277, 27245, 288, 203, 5411, 7279, 18268, 12059, 273, 7766, 2276, 18, 10062, 18268, 12, 4522, 18, 10492, 12, 77, 3631, 8263, 2802, 18, 7240, 16, 404, 16, 404, 16, 576, 16, 576, 1769, 203, 5411, 17847, 5396, 653, 498, 273, 394, 17847, 5396, 653, 12, 3404, 379, 1769, 203, 5411, 5452, 18, 11231, 5510, 12, 4000, 18, 23322, 12, 856, 16, 12059, 10019, 203, 3639, 289, 203, 203, 3639, 7279, 18268, 12059, 273, 7766, 2276, 18, 10062, 18268, 2932, 11351, 3113, 8263, 2802, 18, 7240, 16, 404, 16, 404, 16, 576, 16, 576, 1769, 203, 3639, 5452, 18, 11231, 8381, 12, 4000, 18, 23322, 12, 2704, 17847, 5396, 653, 12, 3404, 379, 3631, 12059, 10019, 203, 3639, 5452, 18, 11231, 8867, 12, 6694, 67, 19533, 67, 4574, 16, 2389, 18, 1467, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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
[ 1, 20308, 203, 377, 380, 7766, 716, 326, 1300, 434, 7279, 18268, 716, 848, 506, 3096, 358, 3134, 2389, 353, 3523, 1845, 622, 326, 4552, 67, 19533, 67, 4574, 18, 203, 377, 380, 17189, 16, 1281, 12059, 87, 3096, 358, 326, 2389, 716, 353, 6802, 2353, 326, 7519, 434, 3134, 2389, 903, 506, 14611, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
c2d385263821177a541b22d1f0576ce6fd20ba01
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/metrics/CloudWatchMetricsScope.java
[ "Apache-2.0" ]
Java
end
null
@Override public void end() { super.end(); final List<MetricDatumWithKey<CloudWatchMetricKey>> dataWithKeys = data.values().stream() .map(metricDatum -> metricDatum.toBuilder().dimensions(getDimensions()).build()) .map(metricDatum -> new MetricDatumWithKey<>(new CloudWatchMetricKey(metricDatum), metricDatum)) .collect(Collectors.toList()); publisher.enqueue(dataWithKeys); }
/** * Once we call this method, all MetricDatums added to the scope will be enqueued to the publisher runnable. * We enqueue MetricDatumWithKey because the publisher will aggregate similar metrics (i.e. MetricDatum with the * same metricName) in the background thread. Hence aggregation using MetricDatumWithKey will be especially useful * when aggregating across multiple MetricScopes. */
Once we call this method, all MetricDatums added to the scope will be enqueued to the publisher runnable. We enqueue MetricDatumWithKey because the publisher will aggregate similar metrics in the background thread. Hence aggregation using MetricDatumWithKey will be especially useful when aggregating across multiple MetricScopes.
[ "Once", "we", "call", "this", "method", "all", "MetricDatums", "added", "to", "the", "scope", "will", "be", "enqueued", "to", "the", "publisher", "runnable", ".", "We", "enqueue", "MetricDatumWithKey", "because", "the", "publisher", "will", "aggregate", "similar", "metrics", "in", "the", "background", "thread", ".", "Hence", "aggregation", "using", "MetricDatumWithKey", "will", "be", "especially", "useful", "when", "aggregating", "across", "multiple", "MetricScopes", "." ]
@Override public void end() { super.end(); final List<MetricDatumWithKey<CloudWatchMetricKey>> dataWithKeys = data.values().stream() .map(metricDatum -> metricDatum.toBuilder().dimensions(getDimensions()).build()) .map(metricDatum -> new MetricDatumWithKey<>(new CloudWatchMetricKey(metricDatum), metricDatum)) .collect(Collectors.toList()); publisher.enqueue(dataWithKeys); }
[ "@", "Override", "public", "void", "end", "(", ")", "{", "super", ".", "end", "(", ")", ";", "final", "List", "<", "MetricDatumWithKey", "<", "CloudWatchMetricKey", ">", ">", "dataWithKeys", "=", "data", ".", "values", "(", ")", ".", "stream", "(", ")", ".", "map", "(", "metricDatum", "->", "metricDatum", ".", "toBuilder", "(", ")", ".", "dimensions", "(", "getDimensions", "(", ")", ")", ".", "build", "(", ")", ")", ".", "map", "(", "metricDatum", "->", "new", "MetricDatumWithKey", "<", ">", "(", "new", "CloudWatchMetricKey", "(", "metricDatum", ")", ",", "metricDatum", ")", ")", ".", "collect", "(", "Collectors", ".", "toList", "(", ")", ")", ";", "publisher", ".", "enqueue", "(", "dataWithKeys", ")", ";", "}" ]
Once we call this method, all MetricDatums added to the scope will be enqueued to the publisher runnable.
[ "Once", "we", "call", "this", "method", "all", "MetricDatums", "added", "to", "the", "scope", "will", "be", "enqueued", "to", "the", "publisher", "runnable", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 565, 1071, 918, 679, 1435, 288, 203, 3639, 2240, 18, 409, 5621, 203, 203, 3639, 727, 987, 32, 5396, 18268, 1190, 653, 32, 30523, 5396, 653, 9778, 501, 1190, 2396, 273, 501, 18, 2372, 7675, 3256, 1435, 203, 7734, 263, 1458, 12, 6899, 18268, 317, 3999, 18268, 18, 869, 1263, 7675, 14797, 12, 588, 10796, 1435, 2934, 3510, 10756, 203, 7734, 263, 1458, 12, 6899, 18268, 317, 394, 7279, 18268, 1190, 653, 29667, 12, 2704, 17847, 5396, 653, 12, 6899, 18268, 3631, 3999, 18268, 3719, 203, 7734, 263, 14676, 12, 10808, 1383, 18, 869, 682, 10663, 203, 203, 3639, 12855, 18, 21798, 12, 892, 1190, 2396, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 1190, 653, 2724, 326, 12855, 903, 7047, 7281, 4309, 261, 77, 18, 73, 18, 7279, 18268, 598, 326, 203, 377, 380, 1967, 25700, 13, 316, 326, 5412, 2650, 18, 670, 802, 10163, 1450, 7279, 18268, 1190, 653, 903, 506, 29440, 5301, 203, 377, 380, 1347, 4377, 1776, 10279, 3229, 7279, 12668, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d25400733e0dea01dd8479e592003d8949525548
Unacademy/amazon-kinesis-client
amazon-kinesis-client/src/main/java/software/amazon/kinesis/common/HashKeyRangeForLease.java
[ "Apache-2.0" ]
Java
deserialize
HashKeyRangeForLease
public static HashKeyRangeForLease deserialize(@NonNull String startingHashKeyStr, @NonNull String endingHashKeyStr) { final BigInteger startingHashKey = new BigInteger(startingHashKeyStr); final BigInteger endingHashKey = new BigInteger(endingHashKeyStr); Validate.isTrue(startingHashKey.compareTo(endingHashKey) < 0, "StartingHashKey %s must be less than EndingHashKey %s ", startingHashKeyStr, endingHashKeyStr); return new HashKeyRangeForLease(startingHashKey, endingHashKey); }
/** * Deserialize from serialized hashKeyRange string from external storage. * * @param startingHashKeyStr * @param endingHashKeyStr * @return HashKeyRangeForLease */
Deserialize from serialized hashKeyRange string from external storage.
[ "Deserialize", "from", "serialized", "hashKeyRange", "string", "from", "external", "storage", "." ]
public static HashKeyRangeForLease deserialize(@NonNull String startingHashKeyStr, @NonNull String endingHashKeyStr) { final BigInteger startingHashKey = new BigInteger(startingHashKeyStr); final BigInteger endingHashKey = new BigInteger(endingHashKeyStr); Validate.isTrue(startingHashKey.compareTo(endingHashKey) < 0, "StartingHashKey %s must be less than EndingHashKey %s ", startingHashKeyStr, endingHashKeyStr); return new HashKeyRangeForLease(startingHashKey, endingHashKey); }
[ "public", "static", "HashKeyRangeForLease", "deserialize", "(", "@", "NonNull", "String", "startingHashKeyStr", ",", "@", "NonNull", "String", "endingHashKeyStr", ")", "{", "final", "BigInteger", "startingHashKey", "=", "new", "BigInteger", "(", "startingHashKeyStr", ")", ";", "final", "BigInteger", "endingHashKey", "=", "new", "BigInteger", "(", "endingHashKeyStr", ")", ";", "Validate", ".", "isTrue", "(", "startingHashKey", ".", "compareTo", "(", "endingHashKey", ")", "<", "0", ",", "\"StartingHashKey %s must be less than EndingHashKey %s \"", ",", "startingHashKeyStr", ",", "endingHashKeyStr", ")", ";", "return", "new", "HashKeyRangeForLease", "(", "startingHashKey", ",", "endingHashKey", ")", ";", "}" ]
Deserialize from serialized hashKeyRange string from external storage.
[ "Deserialize", "from", "serialized", "hashKeyRange", "string", "from", "external", "storage", "." ]
[]
[ { "param": "startingHashKeyStr", "type": "String" }, { "param": "endingHashKeyStr", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "startingHashKeyStr", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "endingHashKeyStr", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 2474, 653, 2655, 1290, 17746, 7673, 26964, 8921, 514, 5023, 31006, 1585, 16, 632, 8921, 514, 11463, 31006, 1585, 13, 288, 203, 3639, 727, 10246, 5023, 31006, 273, 394, 10246, 12, 18526, 31006, 1585, 1769, 203, 3639, 727, 10246, 11463, 31006, 273, 394, 10246, 12, 2846, 31006, 1585, 1769, 203, 3639, 3554, 18, 291, 5510, 12, 18526, 31006, 18, 9877, 774, 12, 2846, 31006, 13, 411, 374, 16, 203, 7734, 315, 11715, 31006, 738, 87, 1297, 506, 5242, 2353, 4403, 310, 31006, 738, 87, 3104, 5023, 31006, 1585, 16, 11463, 31006, 1585, 1769, 203, 3639, 327, 394, 2474, 653, 2655, 1290, 17746, 12, 18526, 31006, 16, 11463, 31006, 1769, 203, 565, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 28529, 628, 5343, 29623, 2655, 533, 628, 3903, 2502, 18, 203, 377, 380, 203, 377, 380, 632, 891, 5023, 31006, 1585, 203, 377, 380, 632, 891, 11463, 31006, 1585, 203, 377, 380, 632, 2463, 2474, 653, 2655, 1290, 17746, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7867a8b948eeb925f2ae22a44240bfd32d8f4fcc
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/content/util/ActivityAdapterService.java
[ "Apache-2.0" ]
Java
requestStreamUri
null
@Override public void requestStreamUri(String uniqueName, int malID, String enTitle, String jpTitle, int episode, String peristentStorage, IContentCallback cb) { // set callback callbacks.remove(uniqueName); callbacks.put(uniqueName, cb); // start activity final Intent i = new Intent(getApplicationContext(), getActivityClass()); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); i.putExtra(ActivityAdapterActivity.EXTRA_MAL_ID, malID); i.putExtra(ActivityAdapterActivity.EXTRA_ANIME_TITLE_EN, enTitle); i.putExtra(ActivityAdapterActivity.EXTRA_ANIME_TITLE_JP, jpTitle); i.putExtra(ActivityAdapterActivity.EXTRA_TARGET_EPISODE, episode); i.putExtra(ActivityAdapterActivity.EXTRA_PERSISTENT_STORAGE, peristentStorage); i.putExtra(ActivityAdapterActivity.EXTRA_UNIQUE_NAME, uniqueName); getApplicationContext().startActivity(i); }
/** * query a video stream URI for a anime and episode. * if this anime is not found or no uri can be found for some other reason, return null * * @param uniqueName the unique name of the adapter to query the uri from * @param malID the anime's id on MAL * @param enTitle the english title of the anime (from MAL) * @param jpTitle the japanese title of the anime (from MAL) * @param episode the episode number to get the stream url of * @param peristentStorage persistent storage * @param cb callback that is called when the stream uri was found */
query a video stream URI for a anime and episode. if this anime is not found or no uri can be found for some other reason, return null
[ "query", "a", "video", "stream", "URI", "for", "a", "anime", "and", "episode", ".", "if", "this", "anime", "is", "not", "found", "or", "no", "uri", "can", "be", "found", "for", "some", "other", "reason", "return", "null" ]
@Override public void requestStreamUri(String uniqueName, int malID, String enTitle, String jpTitle, int episode, String peristentStorage, IContentCallback cb) { callbacks.remove(uniqueName); callbacks.put(uniqueName, cb); final Intent i = new Intent(getApplicationContext(), getActivityClass()); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); i.putExtra(ActivityAdapterActivity.EXTRA_MAL_ID, malID); i.putExtra(ActivityAdapterActivity.EXTRA_ANIME_TITLE_EN, enTitle); i.putExtra(ActivityAdapterActivity.EXTRA_ANIME_TITLE_JP, jpTitle); i.putExtra(ActivityAdapterActivity.EXTRA_TARGET_EPISODE, episode); i.putExtra(ActivityAdapterActivity.EXTRA_PERSISTENT_STORAGE, peristentStorage); i.putExtra(ActivityAdapterActivity.EXTRA_UNIQUE_NAME, uniqueName); getApplicationContext().startActivity(i); }
[ "@", "Override", "public", "void", "requestStreamUri", "(", "String", "uniqueName", ",", "int", "malID", ",", "String", "enTitle", ",", "String", "jpTitle", ",", "int", "episode", ",", "String", "peristentStorage", ",", "IContentCallback", "cb", ")", "{", "callbacks", ".", "remove", "(", "uniqueName", ")", ";", "callbacks", ".", "put", "(", "uniqueName", ",", "cb", ")", ";", "final", "Intent", "i", "=", "new", "Intent", "(", "getApplicationContext", "(", ")", ",", "getActivityClass", "(", ")", ")", ";", "i", ".", "setFlags", "(", "Intent", ".", "FLAG_ACTIVITY_NEW_TASK", "|", "Intent", ".", "FLAG_ACTIVITY_CLEAR_TOP", "|", "Intent", ".", "FLAG_ACTIVITY_NO_HISTORY", "|", "Intent", ".", "FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS", ")", ";", "i", ".", "putExtra", "(", "ActivityAdapterActivity", ".", "EXTRA_MAL_ID", ",", "malID", ")", ";", "i", ".", "putExtra", "(", "ActivityAdapterActivity", ".", "EXTRA_ANIME_TITLE_EN", ",", "enTitle", ")", ";", "i", ".", "putExtra", "(", "ActivityAdapterActivity", ".", "EXTRA_ANIME_TITLE_JP", ",", "jpTitle", ")", ";", "i", ".", "putExtra", "(", "ActivityAdapterActivity", ".", "EXTRA_TARGET_EPISODE", ",", "episode", ")", ";", "i", ".", "putExtra", "(", "ActivityAdapterActivity", ".", "EXTRA_PERSISTENT_STORAGE", ",", "peristentStorage", ")", ";", "i", ".", "putExtra", "(", "ActivityAdapterActivity", ".", "EXTRA_UNIQUE_NAME", ",", "uniqueName", ")", ";", "getApplicationContext", "(", ")", ".", "startActivity", "(", "i", ")", ";", "}" ]
query a video stream URI for a anime and episode.
[ "query", "a", "video", "stream", "URI", "for", "a", "anime", "and", "episode", "." ]
[ "// set callback", "// start activity" ]
[ { "param": "uniqueName", "type": "String" }, { "param": "malID", "type": "int" }, { "param": "enTitle", "type": "String" }, { "param": "jpTitle", "type": "String" }, { "param": "episode", "type": "int" }, { "param": "peristentStorage", "type": "String" }, { "param": "cb", "type": "IContentCallback" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "uniqueName", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "malID", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "enTitle", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "jpTitle", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "episode", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "peristentStorage", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "cb", "type": "IContentCallback", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 3639, 1071, 918, 590, 1228, 3006, 12, 780, 3089, 461, 16, 509, 27431, 734, 16, 514, 570, 4247, 16, 514, 18182, 4247, 16, 509, 17054, 16, 514, 1534, 376, 319, 3245, 16, 467, 1350, 2428, 2875, 13, 288, 203, 5411, 368, 444, 1348, 203, 5411, 6689, 18, 4479, 12, 6270, 461, 1769, 203, 5411, 6689, 18, 458, 12, 6270, 461, 16, 2875, 1769, 203, 203, 5411, 368, 787, 5728, 203, 5411, 727, 15251, 277, 273, 394, 15251, 12, 588, 28278, 9334, 23352, 797, 10663, 203, 5411, 277, 18, 542, 5094, 12, 12105, 18, 9651, 67, 22271, 4107, 67, 12917, 67, 15580, 203, 10792, 571, 15251, 18, 9651, 67, 22271, 4107, 67, 23181, 985, 67, 10462, 203, 10792, 571, 15251, 18, 9651, 67, 22271, 4107, 67, 3417, 67, 31746, 203, 10792, 571, 15251, 18, 9651, 67, 22271, 4107, 67, 2294, 14829, 67, 11249, 67, 862, 19666, 55, 1769, 203, 5411, 277, 18, 458, 7800, 12, 6193, 4216, 6193, 18, 22639, 67, 49, 1013, 67, 734, 16, 27431, 734, 1769, 203, 5411, 277, 18, 458, 7800, 12, 6193, 4216, 6193, 18, 22639, 67, 1258, 3114, 67, 14123, 67, 1157, 16, 570, 4247, 1769, 203, 5411, 277, 18, 458, 7800, 12, 6193, 4216, 6193, 18, 22639, 67, 1258, 3114, 67, 14123, 67, 29532, 16, 18182, 4247, 1769, 203, 5411, 277, 18, 458, 7800, 12, 6193, 4216, 6193, 18, 22639, 67, 16374, 67, 41, 1102, 55, 2712, 16, 17054, 1769, 203, 5411, 277, 18, 458, 7800, 12, 6193, 4216, 6193, 18, 22639, 67, 3194, 28175, 67, 19009, 16, 1534, 376, 319, 3245, 1769, 203, 5411, 277, 18, 458, 7800, 12, 6193, 4216, 6193, 18, 22639, 67, 16879, 67, 1985, 16, 3089, 461, 1769, 203, 5411, 9615, 1042, 7675, 1937, 6193, 12, 77, 1769, 203, 3639, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 540, 380, 843, 279, 6191, 1407, 3699, 364, 279, 392, 494, 471, 17054, 18, 203, 540, 380, 309, 333, 392, 494, 353, 486, 1392, 578, 1158, 2003, 848, 506, 1392, 364, 2690, 1308, 3971, 16, 327, 446, 203, 540, 380, 203, 540, 380, 632, 891, 3089, 461, 4202, 326, 3089, 508, 434, 326, 4516, 358, 843, 326, 2003, 628, 203, 540, 380, 632, 891, 27431, 734, 5411, 326, 392, 494, 1807, 612, 603, 490, 1013, 203, 540, 380, 632, 891, 570, 4247, 1850, 326, 26858, 2077, 434, 326, 392, 494, 261, 2080, 490, 1013, 13, 203, 540, 380, 632, 891, 18182, 4247, 1850, 326, 525, 30472, 3392, 2077, 434, 326, 392, 494, 261, 2080, 490, 1013, 13, 203, 540, 380, 632, 891, 17054, 1850, 2 ]
76dd34fa4b94e1098a25655a516a6cc43fbc1edf
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/content/ContentAdapter.java
[ "Apache-2.0" ]
Java
fromServiceInfo
ContentAdapter
@Nullable public static ContentAdapter fromServiceInfo(@NonNull ServiceInfo svc, @Nullable ContentAdapterManager.IPersistentStorageProvider psProvider) { // get metadata final Bundle meta = svc.metaData; // we have no metadata, dont bind if (isNull(meta)) return null; // get api version from meta final int apiVersion = meta.getInt(META_API_VERSION, -1); // only create if api version requirement is met if (apiVersion < TARGET_API_VERSION) { Log.w("TenshiCP", fmt("Content adapter %s is outdated (found: %d ; target: %d)", svc.name, apiVersion, TARGET_API_VERSION)); return null; } // create the content adapter instance it return new ContentAdapter(psProvider, svc, apiVersion); }
/** * create a new Content Adapter from a given service that has the {@link Constants#ACTION_TENSHI_CONTENT_ADAPTER} * Requires the service info to have metadata * * @param svc the service to create the adapter from * @param psProvider persistent storage provider to use * @return the adapter instance, or null if creation failed (eg. service binding failed, or api version is out of date) */
create a new Content Adapter from a given service that has the Constants#ACTION_TENSHI_CONTENT_ADAPTER Requires the service info to have metadata @param svc the service to create the adapter from @param psProvider persistent storage provider to use @return the adapter instance, or null if creation failed
[ "create", "a", "new", "Content", "Adapter", "from", "a", "given", "service", "that", "has", "the", "Constants#ACTION_TENSHI_CONTENT_ADAPTER", "Requires", "the", "service", "info", "to", "have", "metadata", "@param", "svc", "the", "service", "to", "create", "the", "adapter", "from", "@param", "psProvider", "persistent", "storage", "provider", "to", "use", "@return", "the", "adapter", "instance", "or", "null", "if", "creation", "failed" ]
@Nullable public static ContentAdapter fromServiceInfo(@NonNull ServiceInfo svc, @Nullable ContentAdapterManager.IPersistentStorageProvider psProvider) { final Bundle meta = svc.metaData; if (isNull(meta)) return null; final int apiVersion = meta.getInt(META_API_VERSION, -1); if (apiVersion < TARGET_API_VERSION) { Log.w("TenshiCP", fmt("Content adapter %s is outdated (found: %d ; target: %d)", svc.name, apiVersion, TARGET_API_VERSION)); return null; } return new ContentAdapter(psProvider, svc, apiVersion); }
[ "@", "Nullable", "public", "static", "ContentAdapter", "fromServiceInfo", "(", "@", "NonNull", "ServiceInfo", "svc", ",", "@", "Nullable", "ContentAdapterManager", ".", "IPersistentStorageProvider", "psProvider", ")", "{", "final", "Bundle", "meta", "=", "svc", ".", "metaData", ";", "if", "(", "isNull", "(", "meta", ")", ")", "return", "null", ";", "final", "int", "apiVersion", "=", "meta", ".", "getInt", "(", "META_API_VERSION", ",", "-", "1", ")", ";", "if", "(", "apiVersion", "<", "TARGET_API_VERSION", ")", "{", "Log", ".", "w", "(", "\"TenshiCP\"", ",", "fmt", "(", "\"Content adapter %s is outdated (found: %d ; target: %d)\"", ",", "svc", ".", "name", ",", "apiVersion", ",", "TARGET_API_VERSION", ")", ")", ";", "return", "null", ";", "}", "return", "new", "ContentAdapter", "(", "psProvider", ",", "svc", ",", "apiVersion", ")", ";", "}" ]
create a new Content Adapter from a given service that has the {@link Constants#ACTION_TENSHI_CONTENT_ADAPTER} Requires the service info to have metadata
[ "create", "a", "new", "Content", "Adapter", "from", "a", "given", "service", "that", "has", "the", "{", "@link", "Constants#ACTION_TENSHI_CONTENT_ADAPTER", "}", "Requires", "the", "service", "info", "to", "have", "metadata" ]
[ "// get metadata", "// we have no metadata, dont bind", "// get api version from meta", "// only create if api version requirement is met", "// create the content adapter instance it" ]
[ { "param": "svc", "type": "ServiceInfo" }, { "param": "psProvider", "type": "ContentAdapterManager.IPersistentStorageProvider" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "svc", "type": "ServiceInfo", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "psProvider", "type": "ContentAdapterManager.IPersistentStorageProvider", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 13349, 203, 565, 1071, 760, 3697, 4216, 628, 1179, 966, 26964, 8921, 1956, 966, 7538, 16, 203, 4766, 1171, 632, 13349, 3697, 4216, 1318, 18, 2579, 6572, 3245, 2249, 4250, 2249, 13, 288, 203, 3639, 368, 336, 1982, 203, 3639, 727, 8539, 2191, 273, 7538, 18, 3901, 751, 31, 203, 203, 3639, 368, 732, 1240, 1158, 1982, 16, 14046, 1993, 203, 3639, 309, 261, 291, 2041, 12, 3901, 3719, 203, 5411, 327, 446, 31, 203, 203, 3639, 368, 336, 1536, 1177, 628, 2191, 203, 3639, 727, 509, 12051, 273, 2191, 18, 588, 1702, 12, 19294, 67, 2557, 67, 5757, 16, 300, 21, 1769, 203, 203, 3639, 368, 1338, 752, 309, 1536, 1177, 12405, 353, 5100, 203, 3639, 309, 261, 25336, 411, 16964, 67, 2557, 67, 5757, 13, 288, 203, 5411, 1827, 18, 91, 2932, 25601, 674, 77, 4258, 3113, 1325, 2932, 1350, 4516, 738, 87, 353, 25629, 261, 7015, 30, 738, 72, 274, 1018, 30, 738, 72, 2225, 16, 7538, 18, 529, 16, 12051, 16, 16964, 67, 2557, 67, 5757, 10019, 203, 5411, 327, 446, 31, 203, 3639, 289, 203, 203, 3639,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 752, 279, 394, 3697, 14238, 628, 279, 864, 1156, 716, 711, 326, 8901, 1232, 5245, 7, 12249, 67, 56, 1157, 2664, 45, 67, 9689, 67, 1880, 37, 1856, 654, 97, 203, 377, 380, 16412, 326, 1156, 1123, 358, 1240, 1982, 203, 377, 380, 203, 377, 380, 632, 891, 7538, 3639, 326, 1156, 358, 752, 326, 4516, 628, 203, 377, 380, 632, 891, 4250, 2249, 9195, 2502, 2893, 358, 999, 203, 377, 380, 632, 2463, 326, 4516, 791, 16, 578, 446, 309, 6710, 2535, 261, 1332, 18, 1156, 5085, 2535, 16, 578, 1536, 1177, 353, 596, 434, 1509, 13, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
76dd34fa4b94e1098a25655a516a6cc43fbc1edf
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/content/ContentAdapter.java
[ "Apache-2.0" ]
Java
initWrappers
null
public List<ContentAdapterWrapper> initWrappers(@NonNull Context ctx, boolean keepBound) { // bind the adapter bind(ctx); try { synchronized (ADAPTER_LOCK) { // wait until the service is bound waitUntilServiceConnected(); // get all unique names final String[] uniqueNames = adapter.getUniqueNames(); if (isNull(uniqueNames) || uniqueNames.length <= 0) return null; // init a wrapper for every unique name ArrayList<ContentAdapterWrapper> wrappers = new ArrayList<>(); for (String unName : uniqueNames) { // skip if no or empty unique name if (nullOrEmpty(unName)) { Log.e("TenshiCP", fmt("service %s does not have a unique name\n" + "if you're developing this adapter, make sure your adapter implements getUniqueName() correctly", service.name)); continue; } // get the display name for this unique name final String diName = elvisEmpty(adapter.getDisplayName(unName), unName); // log a warning if no display name found // but fallback to the unique name) if (unName.equalsIgnoreCase(diName)) Log.w("TenshiCP", fmt("content adapter %s does not define a display name (or it's equal to the unique name)! \n " + "If you're developing this adapter, please consider implementing getDisplayName() in your adapter", unName)); // create the wrapper and add it wrappers.add(new ContentAdapterWrapper(this, unName, diName)); } return wrappers; } } catch (RemoteException ex) { Log.e("TenshiCP", "exception in bind: " + ex.toString()); ex.printStackTrace(); return null; } finally { // unbind the service unless keepBound is set if (!keepBound) unbind(ctx); } }
/** * initialize the adapter and create wrappers for all available unique names * * @param ctx context to bind the service in. binding is required to create the wrappers * @param keepBound should the adapter stay bound? * @return was init successful? */
initialize the adapter and create wrappers for all available unique names @param ctx context to bind the service in. binding is required to create the wrappers @param keepBound should the adapter stay bound.
[ "initialize", "the", "adapter", "and", "create", "wrappers", "for", "all", "available", "unique", "names", "@param", "ctx", "context", "to", "bind", "the", "service", "in", ".", "binding", "is", "required", "to", "create", "the", "wrappers", "@param", "keepBound", "should", "the", "adapter", "stay", "bound", "." ]
public List<ContentAdapterWrapper> initWrappers(@NonNull Context ctx, boolean keepBound) { bind(ctx); try { synchronized (ADAPTER_LOCK) { waitUntilServiceConnected(); final String[] uniqueNames = adapter.getUniqueNames(); if (isNull(uniqueNames) || uniqueNames.length <= 0) return null; ArrayList<ContentAdapterWrapper> wrappers = new ArrayList<>(); for (String unName : uniqueNames) { if (nullOrEmpty(unName)) { Log.e("TenshiCP", fmt("service %s does not have a unique name\n" + "if you're developing this adapter, make sure your adapter implements getUniqueName() correctly", service.name)); continue; } final String diName = elvisEmpty(adapter.getDisplayName(unName), unName); if (unName.equalsIgnoreCase(diName)) Log.w("TenshiCP", fmt("content adapter %s does not define a display name (or it's equal to the unique name)! \n " + "If you're developing this adapter, please consider implementing getDisplayName() in your adapter", unName)); wrappers.add(new ContentAdapterWrapper(this, unName, diName)); } return wrappers; } } catch (RemoteException ex) { Log.e("TenshiCP", "exception in bind: " + ex.toString()); ex.printStackTrace(); return null; } finally { if (!keepBound) unbind(ctx); } }
[ "public", "List", "<", "ContentAdapterWrapper", ">", "initWrappers", "(", "@", "NonNull", "Context", "ctx", ",", "boolean", "keepBound", ")", "{", "bind", "(", "ctx", ")", ";", "try", "{", "synchronized", "(", "ADAPTER_LOCK", ")", "{", "waitUntilServiceConnected", "(", ")", ";", "final", "String", "[", "]", "uniqueNames", "=", "adapter", ".", "getUniqueNames", "(", ")", ";", "if", "(", "isNull", "(", "uniqueNames", ")", "||", "uniqueNames", ".", "length", "<=", "0", ")", "return", "null", ";", "ArrayList", "<", "ContentAdapterWrapper", ">", "wrappers", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "for", "(", "String", "unName", ":", "uniqueNames", ")", "{", "if", "(", "nullOrEmpty", "(", "unName", ")", ")", "{", "Log", ".", "e", "(", "\"TenshiCP\"", ",", "fmt", "(", "\"service %s does not have a unique name\\n\"", "+", "\"if you're developing this adapter, make sure your adapter implements getUniqueName() correctly\"", ",", "service", ".", "name", ")", ")", ";", "continue", ";", "}", "final", "String", "diName", "=", "elvisEmpty", "(", "adapter", ".", "getDisplayName", "(", "unName", ")", ",", "unName", ")", ";", "if", "(", "unName", ".", "equalsIgnoreCase", "(", "diName", ")", ")", "Log", ".", "w", "(", "\"TenshiCP\"", ",", "fmt", "(", "\"content adapter %s does not define a display name (or it's equal to the unique name)! \\n \"", "+", "\"If you're developing this adapter, please consider implementing getDisplayName() in your adapter\"", ",", "unName", ")", ")", ";", "wrappers", ".", "add", "(", "new", "ContentAdapterWrapper", "(", "this", ",", "unName", ",", "diName", ")", ")", ";", "}", "return", "wrappers", ";", "}", "}", "catch", "(", "RemoteException", "ex", ")", "{", "Log", ".", "e", "(", "\"TenshiCP\"", ",", "\"exception in bind: \"", "+", "ex", ".", "toString", "(", ")", ")", ";", "ex", ".", "printStackTrace", "(", ")", ";", "return", "null", ";", "}", "finally", "{", "if", "(", "!", "keepBound", ")", "unbind", "(", "ctx", ")", ";", "}", "}" ]
initialize the adapter and create wrappers for all available unique names @param ctx context to bind the service in.
[ "initialize", "the", "adapter", "and", "create", "wrappers", "for", "all", "available", "unique", "names", "@param", "ctx", "context", "to", "bind", "the", "service", "in", "." ]
[ "// bind the adapter", "// wait until the service is bound", "// get all unique names", "// init a wrapper for every unique name", "// skip if no or empty unique name", "// get the display name for this unique name", "// log a warning if no display name found", "// but fallback to the unique name)", "// create the wrapper and add it", "// unbind the service unless keepBound is set" ]
[ { "param": "ctx", "type": "Context" }, { "param": "keepBound", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "ctx", "type": "Context", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "keepBound", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 987, 32, 1350, 4216, 3611, 34, 1208, 24114, 26964, 8921, 1772, 1103, 16, 1250, 3455, 3499, 13, 288, 203, 3639, 368, 1993, 326, 4516, 203, 3639, 1993, 12, 5900, 1769, 203, 203, 3639, 775, 288, 203, 5411, 3852, 261, 1880, 37, 1856, 654, 67, 6589, 13, 288, 203, 7734, 368, 2529, 3180, 326, 1156, 353, 2489, 203, 7734, 2529, 9716, 1179, 8932, 5621, 203, 203, 7734, 368, 336, 777, 3089, 1257, 203, 7734, 727, 514, 8526, 3089, 1557, 273, 4516, 18, 588, 6303, 1557, 5621, 203, 7734, 309, 261, 291, 2041, 12, 6270, 1557, 13, 747, 3089, 1557, 18, 2469, 1648, 374, 13, 203, 10792, 327, 446, 31, 203, 203, 7734, 368, 1208, 279, 4053, 364, 3614, 3089, 508, 203, 7734, 2407, 32, 1350, 4216, 3611, 34, 21589, 273, 394, 2407, 29667, 5621, 203, 7734, 364, 261, 780, 640, 461, 294, 3089, 1557, 13, 288, 203, 10792, 368, 2488, 309, 1158, 578, 1008, 3089, 508, 203, 10792, 309, 261, 2011, 12763, 12, 318, 461, 3719, 288, 203, 13491, 1827, 18, 73, 2932, 25601, 674, 77, 4258, 3113, 1325, 2932, 3278, 738, 87, 1552, 486, 1240, 279, 3089, 508, 64, 82, 6, 397, 203, 27573, 315, 430, 1846, 4565, 17196, 310, 333, 4516, 16, 1221, 3071, 3433, 4516, 4792, 16076, 461, 1435, 8783, 3113, 1156, 18, 529, 10019, 203, 13491, 1324, 31, 203, 10792, 289, 203, 203, 10792, 368, 336, 326, 2562, 508, 364, 333, 3089, 508, 203, 10792, 727, 514, 4314, 461, 273, 415, 3516, 1921, 12, 10204, 18, 588, 20524, 12, 318, 461, 3631, 640, 461, 1769, 203, 203, 10792, 368, 613, 279, 3436, 309, 1158, 2562, 508, 1392, 203, 10792, 368, 1496, 5922, 358, 326, 3089, 508, 13, 203, 10792, 309, 261, 318, 461, 18, 14963, 5556, 12, 3211, 461, 3719, 203, 13491, 1827, 18, 91, 2932, 25601, 674, 77, 4258, 3113, 1325, 2932, 1745, 4516, 738, 87, 1552, 486, 4426, 279, 2562, 508, 261, 280, 518, 1807, 3959, 358, 326, 3089, 508, 13, 5, 521, 82, 315, 397, 203, 27573, 315, 2047, 1846, 4565, 17196, 310, 333, 4516, 16, 9582, 5260, 19981, 22055, 1435, 316, 3433, 4516, 3113, 640, 461, 10019, 203, 203, 10792, 368, 752, 326, 4053, 471, 527, 518, 203, 10792, 21589, 18, 1289, 12, 2704, 3697, 4216, 3611, 12, 2211, 16, 640, 461, 16, 4314, 461, 10019, 203, 7734, 289, 203, 203, 7734, 327, 21589, 31, 203, 5411, 289, 203, 3639, 289, 1044, 261, 5169, 503, 431, 13, 288, 203, 5411, 1827, 18, 73, 2932, 25601, 674, 77, 4258, 3113, 315, 4064, 316, 1993, 30, 315, 397, 431, 18, 10492, 10663, 203, 5411, 431, 18, 1188, 6332, 5621, 203, 5411, 327, 446, 31, 203, 3639, 289, 3095, 288, 203, 5411, 368, 17449, 326, 1156, 3308, 3455, 3499, 353, 444, 203, 5411, 309, 16051, 10102, 3499, 13, 203, 7734, 17449, 12, 5900, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 2319, 3089, 1257, 203, 377, 380, 203, 377, 380, 632, 891, 1103, 4202, 819, 358, 1993, 326, 1156, 316, 18, 5085, 353, 1931, 358, 752, 326, 21589, 203, 377, 380, 632, 891, 3455, 3499, 1410, 326, 4516, 23449, 2489, 35, 203, 377, 380, 632, 2463, 1703, 1208, 6873, 35, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
76dd34fa4b94e1098a25655a516a6cc43fbc1edf
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/content/ContentAdapter.java
[ "Apache-2.0" ]
Java
requestStreamUri
null
public void requestStreamUri(@NonNull String uniqueName, int malID, @NonNull String enTitle, @NonNull String jpTitle, int episode, @NonNull Consumer<String> callback) { async(() -> { try { synchronized (ADAPTER_LOCK) { if (waitUntilServiceConnected() && notNull(adapter)) { // load persistent storage for this adapter final String storageIn = notNull(persistentStorageProvider) ? persistentStorageProvider.getPersistentStorage(uniqueName, malID) : ""; // request uri adapter.requestStreamUri(uniqueName, malID, enTitle, jpTitle, episode, storageIn, new IContentCallback.Stub() { @Override public void streamUriResult(String streamUri, String persistentStorage) { // save modified storage final String storageOut = elvisEmpty(persistentStorage, ""); if (notNull(persistentStorageProvider) && !storageOut.equals(storageIn)) persistentStorageProvider.setPersistentStorage(uniqueName, malID, storageOut); // run callback on ui thread async(() -> streamUri, callback); } }); } } } catch (Exception e) { Log.e("TenshiCP", e.toString()); e.printStackTrace(); // run callback on ui thread async(() -> null, callback); } return null; }, ignored -> { }); }
/** * query a video stream URI for a anime and episode. * if this anime is not found or no uri can be found for some other reason, return null * * @param uniqueName unique name to query from * @param malID the anime's id on MAL * @param enTitle the english title of the anime (from MAL) * @param jpTitle the japanese title of the anime (from MAL) * @param episode the episode number to get the stream url of * @param callback the callback called as soon as the service answered. The result may be null if the service died or answered null. */
query a video stream URI for a anime and episode. if this anime is not found or no uri can be found for some other reason, return null
[ "query", "a", "video", "stream", "URI", "for", "a", "anime", "and", "episode", ".", "if", "this", "anime", "is", "not", "found", "or", "no", "uri", "can", "be", "found", "for", "some", "other", "reason", "return", "null" ]
public void requestStreamUri(@NonNull String uniqueName, int malID, @NonNull String enTitle, @NonNull String jpTitle, int episode, @NonNull Consumer<String> callback) { async(() -> { try { synchronized (ADAPTER_LOCK) { if (waitUntilServiceConnected() && notNull(adapter)) { final String storageIn = notNull(persistentStorageProvider) ? persistentStorageProvider.getPersistentStorage(uniqueName, malID) : ""; adapter.requestStreamUri(uniqueName, malID, enTitle, jpTitle, episode, storageIn, new IContentCallback.Stub() { @Override public void streamUriResult(String streamUri, String persistentStorage) { final String storageOut = elvisEmpty(persistentStorage, ""); if (notNull(persistentStorageProvider) && !storageOut.equals(storageIn)) persistentStorageProvider.setPersistentStorage(uniqueName, malID, storageOut); async(() -> streamUri, callback); } }); } } } catch (Exception e) { Log.e("TenshiCP", e.toString()); e.printStackTrace(); async(() -> null, callback); } return null; }, ignored -> { }); }
[ "public", "void", "requestStreamUri", "(", "@", "NonNull", "String", "uniqueName", ",", "int", "malID", ",", "@", "NonNull", "String", "enTitle", ",", "@", "NonNull", "String", "jpTitle", ",", "int", "episode", ",", "@", "NonNull", "Consumer", "<", "String", ">", "callback", ")", "{", "async", "(", "(", ")", "->", "{", "try", "{", "synchronized", "(", "ADAPTER_LOCK", ")", "{", "if", "(", "waitUntilServiceConnected", "(", ")", "&&", "notNull", "(", "adapter", ")", ")", "{", "final", "String", "storageIn", "=", "notNull", "(", "persistentStorageProvider", ")", "?", "persistentStorageProvider", ".", "getPersistentStorage", "(", "uniqueName", ",", "malID", ")", ":", "\"\"", ";", "adapter", ".", "requestStreamUri", "(", "uniqueName", ",", "malID", ",", "enTitle", ",", "jpTitle", ",", "episode", ",", "storageIn", ",", "new", "IContentCallback", ".", "Stub", "(", ")", "{", "@", "Override", "public", "void", "streamUriResult", "(", "String", "streamUri", ",", "String", "persistentStorage", ")", "{", "final", "String", "storageOut", "=", "elvisEmpty", "(", "persistentStorage", ",", "\"\"", ")", ";", "if", "(", "notNull", "(", "persistentStorageProvider", ")", "&&", "!", "storageOut", ".", "equals", "(", "storageIn", ")", ")", "persistentStorageProvider", ".", "setPersistentStorage", "(", "uniqueName", ",", "malID", ",", "storageOut", ")", ";", "async", "(", "(", ")", "->", "streamUri", ",", "callback", ")", ";", "}", "}", ")", ";", "}", "}", "}", "catch", "(", "Exception", "e", ")", "{", "Log", ".", "e", "(", "\"TenshiCP\"", ",", "e", ".", "toString", "(", ")", ")", ";", "e", ".", "printStackTrace", "(", ")", ";", "async", "(", "(", ")", "->", "null", ",", "callback", ")", ";", "}", "return", "null", ";", "}", ",", "ignored", "->", "{", "}", ")", ";", "}" ]
query a video stream URI for a anime and episode.
[ "query", "a", "video", "stream", "URI", "for", "a", "anime", "and", "episode", "." ]
[ "// load persistent storage for this adapter", "// request uri", "// save modified storage", "// run callback on ui thread", "// run callback on ui thread" ]
[ { "param": "uniqueName", "type": "String" }, { "param": "malID", "type": "int" }, { "param": "enTitle", "type": "String" }, { "param": "jpTitle", "type": "String" }, { "param": "episode", "type": "int" }, { "param": "callback", "type": "Consumer<String>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "uniqueName", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "malID", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "enTitle", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "jpTitle", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "episode", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "callback", "type": "Consumer<String>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 590, 1228, 3006, 26964, 8921, 514, 3089, 461, 16, 509, 27431, 734, 16, 632, 8921, 514, 570, 4247, 16, 632, 8921, 514, 18182, 4247, 16, 509, 17054, 16, 632, 8921, 9326, 32, 780, 34, 1348, 13, 288, 203, 3639, 4326, 12, 1435, 317, 288, 203, 5411, 775, 288, 203, 7734, 3852, 261, 1880, 37, 1856, 654, 67, 6589, 13, 288, 203, 10792, 309, 261, 7048, 9716, 1179, 8932, 1435, 597, 7713, 12, 10204, 3719, 288, 203, 13491, 368, 1262, 9195, 2502, 364, 333, 4516, 203, 13491, 727, 514, 2502, 382, 273, 7713, 12, 19393, 3245, 2249, 13, 692, 9195, 3245, 2249, 18, 588, 11906, 3245, 12, 6270, 461, 16, 27431, 734, 13, 294, 1408, 31, 203, 203, 13491, 368, 590, 2003, 203, 13491, 4516, 18, 2293, 1228, 3006, 12, 6270, 461, 16, 27431, 734, 16, 570, 4247, 16, 18182, 4247, 16, 17054, 16, 2502, 382, 16, 394, 467, 1350, 2428, 18, 11974, 1435, 288, 203, 18701, 632, 6618, 203, 18701, 1071, 918, 1407, 3006, 1253, 12, 780, 1407, 3006, 16, 514, 9195, 3245, 13, 288, 203, 27573, 368, 1923, 4358, 2502, 203, 27573, 727, 514, 2502, 1182, 273, 415, 3516, 1921, 12, 19393, 3245, 16, 1408, 1769, 203, 27573, 309, 261, 902, 2041, 12, 19393, 3245, 2249, 13, 597, 401, 5697, 1182, 18, 14963, 12, 5697, 382, 3719, 203, 4766, 565, 9195, 3245, 2249, 18, 542, 11906, 3245, 12, 6270, 461, 16, 27431, 734, 16, 2502, 1182, 1769, 203, 203, 27573, 368, 1086, 1348, 603, 5915, 2650, 203, 27573, 4326, 12, 1435, 317, 1407, 3006, 16, 1348, 1769, 203, 18701, 289, 203, 13491, 15549, 203, 10792, 289, 203, 7734, 289, 203, 5411, 289, 1044, 261, 503, 425, 13, 288, 203, 7734, 1827, 18, 73, 2932, 25601, 674, 77, 4258, 3113, 425, 18, 10492, 10663, 203, 7734, 425, 18, 1188, 6332, 5621, 203, 203, 7734, 368, 1086, 1348, 603, 5915, 2650, 203, 7734, 4326, 12, 1435, 317, 446, 16, 1348, 1769, 203, 5411, 289, 203, 5411, 327, 446, 31, 203, 3639, 19879, 5455, 317, 288, 203, 3639, 15549, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 843, 279, 6191, 1407, 3699, 364, 279, 392, 494, 471, 17054, 18, 203, 377, 380, 309, 333, 392, 494, 353, 486, 1392, 578, 1158, 2003, 848, 506, 1392, 364, 2690, 1308, 3971, 16, 327, 446, 203, 377, 380, 203, 377, 380, 632, 891, 3089, 461, 3089, 508, 358, 843, 628, 203, 377, 380, 632, 891, 27431, 734, 1377, 326, 392, 494, 1807, 612, 603, 490, 1013, 203, 377, 380, 632, 891, 570, 4247, 565, 326, 26858, 2077, 434, 326, 392, 494, 261, 2080, 490, 1013, 13, 203, 377, 380, 632, 891, 18182, 4247, 565, 326, 525, 30472, 3392, 2077, 434, 326, 392, 494, 261, 2080, 490, 1013, 13, 203, 377, 380, 632, 891, 17054, 565, 326, 17054, 1300, 358, 336, 326, 1407, 2 ]
6b9c7af5d7daca33f6d50195ea72c7be711bb676
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/content/ContentAdapterManager.java
[ "Apache-2.0" ]
Java
discoverAndInit
null
public void discoverAndInit(boolean autoBind) { // unset flag first discoveryFinished = false; // run in background thread async(() -> { // run the discovery synchronized (contentAdapters) { discoverContentAdapters(autoBind); } return null; }, p -> { // call the callbacks and set finish discovery flag discoveryFinished = true; synchronized (discoveryFinishedCallbacks) { final Iterator<Consumer<ContentAdapterManager>> callbacksIterator = discoveryFinishedCallbacks.iterator(); while (callbacksIterator.hasNext()) { // call callback final Consumer<ContentAdapterManager> cb = callbacksIterator.next(); if (notNull(cb)) cb.invoke(this); // remove from list callbacksIterator.remove(); } } }); }
/** * discover and bind to all found content adapters. * Runs on a background thread. to get notified when discovery finished, use {@link #addOnDiscoveryEndCallback(Consumer)} * * @param autoBind automatically bind all found adapters? */
discover and bind to all found content adapters. Runs on a background thread. to get notified when discovery finished, use #addOnDiscoveryEndCallback(Consumer)
[ "discover", "and", "bind", "to", "all", "found", "content", "adapters", ".", "Runs", "on", "a", "background", "thread", ".", "to", "get", "notified", "when", "discovery", "finished", "use", "#addOnDiscoveryEndCallback", "(", "Consumer", ")" ]
public void discoverAndInit(boolean autoBind) { discoveryFinished = false; async(() -> { synchronized (contentAdapters) { discoverContentAdapters(autoBind); } return null; }, p -> { discoveryFinished = true; synchronized (discoveryFinishedCallbacks) { final Iterator<Consumer<ContentAdapterManager>> callbacksIterator = discoveryFinishedCallbacks.iterator(); while (callbacksIterator.hasNext()) { final Consumer<ContentAdapterManager> cb = callbacksIterator.next(); if (notNull(cb)) cb.invoke(this); callbacksIterator.remove(); } } }); }
[ "public", "void", "discoverAndInit", "(", "boolean", "autoBind", ")", "{", "discoveryFinished", "=", "false", ";", "async", "(", "(", ")", "->", "{", "synchronized", "(", "contentAdapters", ")", "{", "discoverContentAdapters", "(", "autoBind", ")", ";", "}", "return", "null", ";", "}", ",", "p", "->", "{", "discoveryFinished", "=", "true", ";", "synchronized", "(", "discoveryFinishedCallbacks", ")", "{", "final", "Iterator", "<", "Consumer", "<", "ContentAdapterManager", ">", ">", "callbacksIterator", "=", "discoveryFinishedCallbacks", ".", "iterator", "(", ")", ";", "while", "(", "callbacksIterator", ".", "hasNext", "(", ")", ")", "{", "final", "Consumer", "<", "ContentAdapterManager", ">", "cb", "=", "callbacksIterator", ".", "next", "(", ")", ";", "if", "(", "notNull", "(", "cb", ")", ")", "cb", ".", "invoke", "(", "this", ")", ";", "callbacksIterator", ".", "remove", "(", ")", ";", "}", "}", "}", ")", ";", "}" ]
discover and bind to all found content adapters.
[ "discover", "and", "bind", "to", "all", "found", "content", "adapters", "." ]
[ "// unset flag first", "// run in background thread", "// run the discovery", "// call the callbacks and set finish discovery flag", "// call callback", "// remove from list" ]
[ { "param": "autoBind", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "autoBind", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 10372, 1876, 2570, 12, 6494, 3656, 3357, 13, 288, 203, 3639, 368, 2646, 2982, 1122, 203, 3639, 11030, 10577, 273, 629, 31, 203, 203, 3639, 368, 1086, 316, 5412, 2650, 203, 3639, 4326, 12, 1435, 317, 288, 203, 5411, 368, 1086, 326, 11030, 203, 5411, 3852, 261, 1745, 26620, 13, 288, 203, 7734, 10372, 1350, 26620, 12, 6079, 3357, 1769, 203, 5411, 289, 203, 5411, 327, 446, 31, 203, 3639, 19879, 293, 317, 288, 203, 5411, 368, 745, 326, 6689, 471, 444, 4076, 11030, 2982, 203, 5411, 11030, 10577, 273, 638, 31, 203, 5411, 3852, 261, 22268, 10577, 10617, 13, 288, 203, 7734, 727, 4498, 32, 5869, 32, 1350, 4216, 1318, 9778, 6689, 3198, 273, 11030, 10577, 10617, 18, 9838, 5621, 203, 7734, 1323, 261, 13316, 3198, 18, 5332, 2134, 10756, 288, 203, 10792, 368, 745, 1348, 203, 10792, 727, 9326, 32, 1350, 4216, 1318, 34, 2875, 273, 6689, 3198, 18, 4285, 5621, 203, 10792, 309, 261, 902, 2041, 12, 7358, 3719, 203, 13491, 2875, 18, 14407, 12, 2211, 1769, 203, 203, 10792, 368, 1206, 628, 666, 203, 10792, 6689, 3198, 18, 4479, 5621, 203, 7734, 289, 203, 5411, 289, 203, 3639, 15549, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 10372, 471, 1993, 358, 777, 1392, 913, 17272, 18, 203, 377, 380, 1939, 87, 603, 279, 5412, 2650, 18, 358, 336, 18791, 1347, 11030, 6708, 16, 999, 8901, 1232, 468, 1289, 1398, 11918, 1638, 2428, 12, 5869, 16869, 203, 377, 380, 203, 377, 380, 632, 891, 3656, 3357, 6635, 1993, 777, 1392, 17272, 35, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
6b9c7af5d7daca33f6d50195ea72c7be711bb676
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/content/ContentAdapterManager.java
[ "Apache-2.0" ]
Java
addOnDiscoveryEndCallback
null
public void addOnDiscoveryEndCallback(@NonNull Consumer<ContentAdapterManager> callback) { // if already finished, call directly if (discoveryFinished) { callback.invoke(this); return; } // otherwise add to callbacks list synchronized (discoveryFinishedCallbacks) { discoveryFinishedCallbacks.add(callback); } }
/** * add a callback for when adapter discovery ended. * If discovery already ended, the callback is called immediately. * The callback is called on the main thread. * * @param callback the callback to call when discovery finished. */
add a callback for when adapter discovery ended. If discovery already ended, the callback is called immediately. The callback is called on the main thread. @param callback the callback to call when discovery finished.
[ "add", "a", "callback", "for", "when", "adapter", "discovery", "ended", ".", "If", "discovery", "already", "ended", "the", "callback", "is", "called", "immediately", ".", "The", "callback", "is", "called", "on", "the", "main", "thread", ".", "@param", "callback", "the", "callback", "to", "call", "when", "discovery", "finished", "." ]
public void addOnDiscoveryEndCallback(@NonNull Consumer<ContentAdapterManager> callback) { if (discoveryFinished) { callback.invoke(this); return; } synchronized (discoveryFinishedCallbacks) { discoveryFinishedCallbacks.add(callback); } }
[ "public", "void", "addOnDiscoveryEndCallback", "(", "@", "NonNull", "Consumer", "<", "ContentAdapterManager", ">", "callback", ")", "{", "if", "(", "discoveryFinished", ")", "{", "callback", ".", "invoke", "(", "this", ")", ";", "return", ";", "}", "synchronized", "(", "discoveryFinishedCallbacks", ")", "{", "discoveryFinishedCallbacks", ".", "add", "(", "callback", ")", ";", "}", "}" ]
add a callback for when adapter discovery ended.
[ "add", "a", "callback", "for", "when", "adapter", "discovery", "ended", "." ]
[ "// if already finished, call directly", "// otherwise add to callbacks list" ]
[ { "param": "callback", "type": "Consumer<ContentAdapterManager>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "callback", "type": "Consumer<ContentAdapterManager>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 19365, 11918, 1638, 2428, 26964, 8921, 9326, 32, 1350, 4216, 1318, 34, 1348, 13, 288, 203, 3639, 368, 309, 1818, 6708, 16, 745, 5122, 203, 3639, 309, 261, 22268, 10577, 13, 288, 203, 5411, 1348, 18, 14407, 12, 2211, 1769, 203, 5411, 327, 31, 203, 3639, 289, 203, 203, 3639, 368, 3541, 527, 358, 6689, 666, 203, 3639, 3852, 261, 22268, 10577, 10617, 13, 288, 203, 5411, 11030, 10577, 10617, 18, 1289, 12, 3394, 1769, 203, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 527, 279, 1348, 364, 1347, 4516, 11030, 16926, 18, 203, 377, 380, 971, 11030, 1818, 16926, 16, 326, 1348, 353, 2566, 7636, 18, 203, 377, 380, 1021, 1348, 353, 2566, 603, 326, 2774, 2650, 18, 203, 377, 380, 203, 377, 380, 632, 891, 1348, 326, 1348, 358, 745, 1347, 11030, 6708, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
6b9c7af5d7daca33f6d50195ea72c7be711bb676
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/content/ContentAdapterManager.java
[ "Apache-2.0" ]
Java
unbindAll
null
public void unbindAll() { synchronized (contentAdapters) { for (ContentAdapterWrapper ca : contentAdapters) ca.unbind(ctx); } }
/** * unbind all services. * call before closing the application */
unbind all services. call before closing the application
[ "unbind", "all", "services", ".", "call", "before", "closing", "the", "application" ]
public void unbindAll() { synchronized (contentAdapters) { for (ContentAdapterWrapper ca : contentAdapters) ca.unbind(ctx); } }
[ "public", "void", "unbindAll", "(", ")", "{", "synchronized", "(", "contentAdapters", ")", "{", "for", "(", "ContentAdapterWrapper", "ca", ":", "contentAdapters", ")", "ca", ".", "unbind", "(", "ctx", ")", ";", "}", "}" ]
unbind all services.
[ "unbind", "all", "services", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 17449, 1595, 1435, 288, 203, 3639, 3852, 261, 1745, 26620, 13, 288, 203, 5411, 364, 261, 1350, 4216, 3611, 3474, 294, 913, 26620, 13, 203, 7734, 3474, 18, 318, 4376, 12, 5900, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 17449, 777, 4028, 18, 203, 377, 380, 745, 1865, 7647, 326, 2521, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
6b9c7af5d7daca33f6d50195ea72c7be711bb676
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/content/ContentAdapterManager.java
[ "Apache-2.0" ]
Java
createAndAddAdapter
null
private void createAndAddAdapter(@NonNull ServiceInfo adapterService, boolean bind) { Log.i("TenshiCP", fmt("Binding Content Adapter %s", adapterService.name)); // create ContentAdapter instance final ContentAdapter adapter = ContentAdapter.fromServiceInfo(adapterService, persistentStorageProvider); // stop if adapter is null if (isNull(adapter)) return; // get the list of adapter wrappers from the adapter final List<ContentAdapterWrapper> wrappers = adapter.initWrappers(ctx, bind); // stop and unbind if wrapper initialization failed if (isNull(wrappers) || wrappers.isEmpty()) { adapter.unbind(ctx); return; } // add each wrapper to the global list // but only if they are unique to the list for (ContentAdapterWrapper w : wrappers) { if (notNull(getAdapter(w.getUniqueName()))) { Log.w("TenshiCP", fmt("adapter %s is duplicated, not adding it!", w.getUniqueName())); continue; } // add to list contentAdapters.add(w); } }
/** * create the content adapter instance and add to the list of content adapters. * optionally call .bind() on the adapter * * @param adapterService the service to bind * @param bind should we call .bind() on the adapter? */
create the content adapter instance and add to the list of content adapters. optionally call .bind() on the adapter
[ "create", "the", "content", "adapter", "instance", "and", "add", "to", "the", "list", "of", "content", "adapters", ".", "optionally", "call", ".", "bind", "()", "on", "the", "adapter" ]
private void createAndAddAdapter(@NonNull ServiceInfo adapterService, boolean bind) { Log.i("TenshiCP", fmt("Binding Content Adapter %s", adapterService.name)); final ContentAdapter adapter = ContentAdapter.fromServiceInfo(adapterService, persistentStorageProvider); if (isNull(adapter)) return; final List<ContentAdapterWrapper> wrappers = adapter.initWrappers(ctx, bind); if (isNull(wrappers) || wrappers.isEmpty()) { adapter.unbind(ctx); return; } for (ContentAdapterWrapper w : wrappers) { if (notNull(getAdapter(w.getUniqueName()))) { Log.w("TenshiCP", fmt("adapter %s is duplicated, not adding it!", w.getUniqueName())); continue; } contentAdapters.add(w); } }
[ "private", "void", "createAndAddAdapter", "(", "@", "NonNull", "ServiceInfo", "adapterService", ",", "boolean", "bind", ")", "{", "Log", ".", "i", "(", "\"TenshiCP\"", ",", "fmt", "(", "\"Binding Content Adapter %s\"", ",", "adapterService", ".", "name", ")", ")", ";", "final", "ContentAdapter", "adapter", "=", "ContentAdapter", ".", "fromServiceInfo", "(", "adapterService", ",", "persistentStorageProvider", ")", ";", "if", "(", "isNull", "(", "adapter", ")", ")", "return", ";", "final", "List", "<", "ContentAdapterWrapper", ">", "wrappers", "=", "adapter", ".", "initWrappers", "(", "ctx", ",", "bind", ")", ";", "if", "(", "isNull", "(", "wrappers", ")", "||", "wrappers", ".", "isEmpty", "(", ")", ")", "{", "adapter", ".", "unbind", "(", "ctx", ")", ";", "return", ";", "}", "for", "(", "ContentAdapterWrapper", "w", ":", "wrappers", ")", "{", "if", "(", "notNull", "(", "getAdapter", "(", "w", ".", "getUniqueName", "(", ")", ")", ")", ")", "{", "Log", ".", "w", "(", "\"TenshiCP\"", ",", "fmt", "(", "\"adapter %s is duplicated, not adding it!\"", ",", "w", ".", "getUniqueName", "(", ")", ")", ")", ";", "continue", ";", "}", "contentAdapters", ".", "add", "(", "w", ")", ";", "}", "}" ]
create the content adapter instance and add to the list of content adapters.
[ "create", "the", "content", "adapter", "instance", "and", "add", "to", "the", "list", "of", "content", "adapters", "." ]
[ "// create ContentAdapter instance", "// stop if adapter is null", "// get the list of adapter wrappers from the adapter", "// stop and unbind if wrapper initialization failed", "// add each wrapper to the global list", "// but only if they are unique to the list", "// add to list" ]
[ { "param": "adapterService", "type": "ServiceInfo" }, { "param": "bind", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "adapterService", "type": "ServiceInfo", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "bind", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 30545, 986, 4216, 26964, 8921, 1956, 966, 4516, 1179, 16, 1250, 1993, 13, 288, 203, 3639, 1827, 18, 77, 2932, 25601, 674, 77, 4258, 3113, 1325, 2932, 5250, 3697, 14238, 738, 87, 3113, 4516, 1179, 18, 529, 10019, 203, 203, 3639, 368, 752, 3697, 4216, 791, 203, 3639, 727, 3697, 4216, 4516, 273, 3697, 4216, 18, 2080, 1179, 966, 12, 10204, 1179, 16, 9195, 3245, 2249, 1769, 203, 203, 3639, 368, 2132, 309, 4516, 353, 446, 203, 3639, 309, 261, 291, 2041, 12, 10204, 3719, 203, 5411, 327, 31, 203, 203, 3639, 368, 336, 326, 666, 434, 4516, 21589, 628, 326, 4516, 203, 3639, 727, 987, 32, 1350, 4216, 3611, 34, 21589, 273, 4516, 18, 2738, 24114, 12, 5900, 16, 1993, 1769, 203, 203, 3639, 368, 2132, 471, 17449, 309, 4053, 10313, 2535, 203, 3639, 309, 261, 291, 2041, 12, 4113, 10422, 13, 747, 21589, 18, 291, 1921, 10756, 288, 203, 5411, 4516, 18, 318, 4376, 12, 5900, 1769, 203, 5411, 327, 31, 203, 3639, 289, 203, 203, 3639, 368, 527, 1517, 4053, 358, 326, 2552, 666, 203, 3639, 368, 1496, 1338, 309, 2898, 854, 3089, 358, 326, 666, 203, 3639, 364, 261, 1350, 4216, 3611, 341, 294, 21589, 13, 288, 203, 5411, 309, 261, 902, 2041, 12, 588, 4216, 12, 91, 18, 588, 6303, 461, 1435, 20349, 288, 203, 7734, 1827, 18, 91, 2932, 25601, 674, 77, 4258, 3113, 1325, 2932, 10204, 738, 87, 353, 16975, 16, 486, 6534, 518, 5, 3113, 341, 18, 588, 6303, 461, 1435, 10019, 203, 7734, 1324, 31, 203, 5411, 289, 203, 203, 5411, 368, 527, 358, 666, 203, 5411, 913, 26620, 18, 1289, 12, 91, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 752, 326, 913, 4516, 791, 471, 527, 358, 326, 666, 434, 913, 17272, 18, 203, 377, 380, 8771, 745, 263, 4376, 1435, 603, 326, 4516, 203, 377, 380, 203, 377, 380, 632, 891, 4516, 1179, 326, 1156, 358, 1993, 203, 377, 380, 632, 891, 1993, 6647, 1410, 732, 745, 263, 4376, 1435, 603, 326, 4516, 35, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7805b56bac7dd0dab245d4fe8cf57839b23fde89
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/content/util/WebViewAdapterActivity.java
[ "Apache-2.0" ]
Java
initWebView
WebView
protected WebView initWebView() { // create the client that will inject our js payload final WebViewClient webViewClient = new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { view.loadUrl("javascript:(function _js_loader(){ " + getJSLoader() + " })()"); } }; // create and setup webview final WebView webView = new WebView(this); webView.setWebViewClient(webViewClient); configureWebView(webView, webView.getSettings()); // add javascript interfaces addJavascriptInterfaces(webView); return webView; }
/** * initialize the webview, ready for js injection * * @return the initialized webview */
initialize the webview, ready for js injection @return the initialized webview
[ "initialize", "the", "webview", "ready", "for", "js", "injection", "@return", "the", "initialized", "webview" ]
protected WebView initWebView() { final WebViewClient webViewClient = new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { view.loadUrl("javascript:(function _js_loader(){ " + getJSLoader() + " })()"); } }; final WebView webView = new WebView(this); webView.setWebViewClient(webViewClient); configureWebView(webView, webView.getSettings()); addJavascriptInterfaces(webView); return webView; }
[ "protected", "WebView", "initWebView", "(", ")", "{", "final", "WebViewClient", "webViewClient", "=", "new", "WebViewClient", "(", ")", "{", "@", "Override", "public", "void", "onPageFinished", "(", "WebView", "view", ",", "String", "url", ")", "{", "view", ".", "loadUrl", "(", "\"javascript:(function _js_loader(){ \"", "+", "getJSLoader", "(", ")", "+", "\" })()\"", ")", ";", "}", "}", ";", "final", "WebView", "webView", "=", "new", "WebView", "(", "this", ")", ";", "webView", ".", "setWebViewClient", "(", "webViewClient", ")", ";", "configureWebView", "(", "webView", ",", "webView", ".", "getSettings", "(", ")", ")", ";", "addJavascriptInterfaces", "(", "webView", ")", ";", "return", "webView", ";", "}" ]
initialize the webview, ready for js injection @return the initialized webview
[ "initialize", "the", "webview", "ready", "for", "js", "injection", "@return", "the", "initialized", "webview" ]
[ "// create the client that will inject our js payload", "// create and setup webview", "// add javascript interfaces" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 2999, 1767, 1208, 4079, 1767, 1435, 288, 203, 3639, 368, 752, 326, 1004, 716, 903, 4590, 3134, 3828, 2385, 203, 3639, 727, 2999, 1767, 1227, 3311, 1767, 1227, 273, 394, 2999, 1767, 1227, 1435, 288, 203, 5411, 632, 6618, 203, 5411, 1071, 918, 603, 1964, 10577, 12, 4079, 1767, 1476, 16, 514, 880, 13, 288, 203, 7734, 1476, 18, 945, 1489, 2932, 11242, 30, 12, 915, 389, 2924, 67, 6714, 1435, 95, 315, 397, 30257, 2886, 1435, 397, 315, 289, 13, 1435, 8863, 203, 5411, 289, 203, 3639, 289, 31, 203, 203, 3639, 368, 752, 471, 3875, 3311, 1945, 203, 3639, 727, 2999, 1767, 3311, 1767, 273, 394, 2999, 1767, 12, 2211, 1769, 203, 3639, 3311, 1767, 18, 542, 4079, 1767, 1227, 12, 4875, 1767, 1227, 1769, 203, 3639, 5068, 4079, 1767, 12, 4875, 1767, 16, 3311, 1767, 18, 588, 2628, 10663, 203, 203, 3639, 368, 527, 11341, 7349, 203, 3639, 527, 27129, 10273, 12, 4875, 1767, 1769, 203, 3639, 327, 3311, 1767, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 4046, 326, 3311, 1945, 16, 5695, 364, 3828, 10380, 203, 377, 380, 203, 377, 380, 632, 2463, 326, 6454, 3311, 1945, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7805b56bac7dd0dab245d4fe8cf57839b23fde89
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/content/util/WebViewAdapterActivity.java
[ "Apache-2.0" ]
Java
configureWebView
null
@SuppressLint("SetJavaScriptEnabled") protected void configureWebView(@SuppressWarnings({"unused", "RedundantSuppression"}) @NonNull WebView webView, @NonNull WebSettings settings) { // required for javascript interfaces... and like 99% of all pages settings.setJavaScriptEnabled(true); }
/** * configure the webview's settings. * by default only enables js * @param webView the webview to configure * @param settings the webview's settings (same as webView.getSettings()) */
configure the webview's settings. by default only enables js @param webView the webview to configure @param settings the webview's settings (same as webView.getSettings())
[ "configure", "the", "webview", "'", "s", "settings", ".", "by", "default", "only", "enables", "js", "@param", "webView", "the", "webview", "to", "configure", "@param", "settings", "the", "webview", "'", "s", "settings", "(", "same", "as", "webView", ".", "getSettings", "()", ")" ]
@SuppressLint("SetJavaScriptEnabled") protected void configureWebView(@SuppressWarnings({"unused", "RedundantSuppression"}) @NonNull WebView webView, @NonNull WebSettings settings) { settings.setJavaScriptEnabled(true); }
[ "@", "SuppressLint", "(", "\"SetJavaScriptEnabled\"", ")", "protected", "void", "configureWebView", "(", "@", "SuppressWarnings", "(", "{", "\"unused\"", ",", "\"RedundantSuppression\"", "}", ")", "@", "NonNull", "WebView", "webView", ",", "@", "NonNull", "WebSettings", "settings", ")", "{", "settings", ".", "setJavaScriptEnabled", "(", "true", ")", ";", "}" ]
configure the webview's settings.
[ "configure", "the", "webview", "'", "s", "settings", "." ]
[ "// required for javascript interfaces... and like 99% of all pages" ]
[ { "param": "webView", "type": "WebView" }, { "param": "settings", "type": "WebSettings" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "webView", "type": "WebView", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "settings", "type": "WebSettings", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 30350, 2932, 694, 16634, 1526, 7923, 203, 565, 4750, 918, 5068, 4079, 1767, 26964, 29282, 4312, 12590, 6, 14375, 3113, 315, 3715, 15362, 3088, 1337, 6, 6792, 632, 8921, 2999, 1767, 3311, 1767, 16, 632, 8921, 2999, 2628, 1947, 13, 203, 565, 288, 203, 3639, 368, 1931, 364, 11341, 7349, 2777, 471, 3007, 14605, 9, 434, 777, 4689, 203, 3639, 1947, 18, 542, 16634, 1526, 12, 3767, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 5068, 326, 3311, 1945, 1807, 1947, 18, 203, 377, 380, 635, 805, 1338, 19808, 3828, 203, 377, 380, 632, 891, 3311, 1767, 326, 3311, 1945, 358, 5068, 203, 377, 380, 632, 891, 1947, 326, 3311, 1945, 1807, 1947, 261, 14307, 487, 3311, 1767, 18, 588, 2628, 10756, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7805b56bac7dd0dab245d4fe8cf57839b23fde89
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/content/util/WebViewAdapterActivity.java
[ "Apache-2.0" ]
Java
loadPayloadFromRaw
String
@SuppressWarnings({"unused", "RedundantSuppression"}) @NonNull protected String loadPayloadFromRaw(@SuppressWarnings("SameParameterValue") @RawRes int id) throws IOException { // open reader for the resource try (BufferedReader rawIn = new BufferedReader(new InputStreamReader( getResources().openRawResource(id)))) { // read and append line- by- line final StringBuilder payload = new StringBuilder(); String ln; while ((ln = rawIn.readLine()) != null) payload.append(ln).append("\n"); // return the payload return payload.toString(); } }
/** * load a payload from raw resources * * @param id the id of the payload to load * @return the loaded payload. never null, tho may be empty if the raw file is empty * @throws IOException if the id was not found or closing of the resource failed */
load a payload from raw resources @param id the id of the payload to load @return the loaded payload. never null, tho may be empty if the raw file is empty @throws IOException if the id was not found or closing of the resource failed
[ "load", "a", "payload", "from", "raw", "resources", "@param", "id", "the", "id", "of", "the", "payload", "to", "load", "@return", "the", "loaded", "payload", ".", "never", "null", "tho", "may", "be", "empty", "if", "the", "raw", "file", "is", "empty", "@throws", "IOException", "if", "the", "id", "was", "not", "found", "or", "closing", "of", "the", "resource", "failed" ]
@SuppressWarnings({"unused", "RedundantSuppression"}) @NonNull protected String loadPayloadFromRaw(@SuppressWarnings("SameParameterValue") @RawRes int id) throws IOException { try (BufferedReader rawIn = new BufferedReader(new InputStreamReader( getResources().openRawResource(id)))) { final StringBuilder payload = new StringBuilder(); String ln; while ((ln = rawIn.readLine()) != null) payload.append(ln).append("\n"); return payload.toString(); } }
[ "@", "SuppressWarnings", "(", "{", "\"unused\"", ",", "\"RedundantSuppression\"", "}", ")", "@", "NonNull", "protected", "String", "loadPayloadFromRaw", "(", "@", "SuppressWarnings", "(", "\"SameParameterValue\"", ")", "@", "RawRes", "int", "id", ")", "throws", "IOException", "{", "try", "(", "BufferedReader", "rawIn", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "getResources", "(", ")", ".", "openRawResource", "(", "id", ")", ")", ")", ")", "{", "final", "StringBuilder", "payload", "=", "new", "StringBuilder", "(", ")", ";", "String", "ln", ";", "while", "(", "(", "ln", "=", "rawIn", ".", "readLine", "(", ")", ")", "!=", "null", ")", "payload", ".", "append", "(", "ln", ")", ".", "append", "(", "\"\\n\"", ")", ";", "return", "payload", ".", "toString", "(", ")", ";", "}", "}" ]
load a payload from raw resources @param id the id of the payload to load @return the loaded payload.
[ "load", "a", "payload", "from", "raw", "resources", "@param", "id", "the", "id", "of", "the", "payload", "to", "load", "@return", "the", "loaded", "payload", "." ]
[ "// open reader for the resource", "// read and append line- by- line", "// return the payload" ]
[ { "param": "id", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "id", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 12590, 6, 14375, 3113, 315, 3715, 15362, 3088, 1337, 6, 6792, 203, 565, 632, 8921, 203, 565, 4750, 514, 1262, 6110, 1265, 4809, 26964, 29282, 4312, 2932, 8650, 29655, 7923, 632, 4809, 607, 509, 612, 13, 1216, 1860, 288, 203, 3639, 368, 1696, 2949, 364, 326, 1058, 203, 3639, 775, 261, 17947, 2514, 1831, 382, 273, 394, 10633, 12, 2704, 15322, 12, 203, 7734, 14590, 7675, 3190, 4809, 1420, 12, 350, 3719, 3719, 288, 203, 203, 5411, 368, 855, 471, 714, 980, 17, 635, 17, 980, 203, 5411, 727, 3225, 2385, 273, 394, 3225, 5621, 203, 5411, 514, 7211, 31, 203, 5411, 1323, 14015, 2370, 273, 1831, 382, 18, 896, 1670, 10756, 480, 446, 13, 203, 7734, 2385, 18, 6923, 12, 2370, 2934, 6923, 31458, 82, 8863, 203, 203, 5411, 368, 327, 326, 2385, 203, 5411, 327, 2385, 18, 10492, 5621, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1262, 279, 2385, 628, 1831, 2703, 203, 377, 380, 203, 377, 380, 632, 891, 612, 326, 612, 434, 326, 2385, 358, 1262, 203, 377, 380, 632, 2463, 326, 4203, 2385, 18, 5903, 446, 16, 286, 83, 2026, 506, 1008, 309, 326, 1831, 585, 353, 1008, 203, 377, 380, 632, 15069, 1860, 309, 326, 612, 1703, 486, 1392, 578, 7647, 434, 326, 1058, 2535, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
49cf45a595245cf86ade32fd50cbd661ed596c33
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/lang/LanguageUtil.java
[ "Apache-2.0" ]
Java
listOf
null
@SafeVarargs @NonNull public static <T> ArrayList<T> listOf(@NonNull T... x) { return new ArrayList<>(Arrays.asList(x)); }
/** * create a list of the given values * * @param x the list items * @param <T> the type of the list * @return the list */
create a list of the given values @param x the list items @param the type of the list @return the list
[ "create", "a", "list", "of", "the", "given", "values", "@param", "x", "the", "list", "items", "@param", "the", "type", "of", "the", "list", "@return", "the", "list" ]
@SafeVarargs @NonNull public static <T> ArrayList<T> listOf(@NonNull T... x) { return new ArrayList<>(Arrays.asList(x)); }
[ "@", "SafeVarargs", "@", "NonNull", "public", "static", "<", "T", ">", "ArrayList", "<", "T", ">", "listOf", "(", "@", "NonNull", "T", "...", "x", ")", "{", "return", "new", "ArrayList", "<", ">", "(", "Arrays", ".", "asList", "(", "x", ")", ")", ";", "}" ]
create a list of the given values @param x the list items @param <T> the type of the list @return the list
[ "create", "a", "list", "of", "the", "given", "values", "@param", "x", "the", "list", "items", "@param", "<T", ">", "the", "type", "of", "the", "list", "@return", "the", "list" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 9890, 27232, 203, 565, 632, 8921, 203, 565, 1071, 760, 411, 56, 34, 2407, 32, 56, 34, 24692, 26964, 8921, 399, 2777, 619, 13, 288, 203, 3639, 327, 394, 2407, 29667, 12, 12726, 18, 345, 682, 12, 92, 10019, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 752, 279, 666, 434, 326, 864, 924, 203, 377, 380, 203, 377, 380, 632, 891, 619, 282, 326, 666, 1516, 203, 377, 380, 632, 891, 411, 56, 34, 326, 618, 434, 326, 666, 203, 377, 380, 632, 2463, 326, 666, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
49cf45a595245cf86ade32fd50cbd661ed596c33
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/lang/LanguageUtil.java
[ "Apache-2.0" ]
Java
listOf
null
@SafeVarargs @NonNull public static <T> ArrayList<T> listOf(@Nullable Collection<T>... cx) { ArrayList<T> ret = new ArrayList<>(); if (notNull(cx)) for (Collection<T> c : cx) if (notNull(c)) ret.addAll(c); return ret; }
/** * create a list of the given list values * * @param cx the list items * @param <T> the type of the list * @return the list */
create a list of the given list values @param cx the list items @param the type of the list @return the list
[ "create", "a", "list", "of", "the", "given", "list", "values", "@param", "cx", "the", "list", "items", "@param", "the", "type", "of", "the", "list", "@return", "the", "list" ]
@SafeVarargs @NonNull public static <T> ArrayList<T> listOf(@Nullable Collection<T>... cx) { ArrayList<T> ret = new ArrayList<>(); if (notNull(cx)) for (Collection<T> c : cx) if (notNull(c)) ret.addAll(c); return ret; }
[ "@", "SafeVarargs", "@", "NonNull", "public", "static", "<", "T", ">", "ArrayList", "<", "T", ">", "listOf", "(", "@", "Nullable", "Collection", "<", "T", ">", "...", "cx", ")", "{", "ArrayList", "<", "T", ">", "ret", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "if", "(", "notNull", "(", "cx", ")", ")", "for", "(", "Collection", "<", "T", ">", "c", ":", "cx", ")", "if", "(", "notNull", "(", "c", ")", ")", "ret", ".", "addAll", "(", "c", ")", ";", "return", "ret", ";", "}" ]
create a list of the given list values @param cx the list items @param <T> the type of the list @return the list
[ "create", "a", "list", "of", "the", "given", "list", "values", "@param", "cx", "the", "list", "items", "@param", "<T", ">", "the", "type", "of", "the", "list", "@return", "the", "list" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 9890, 27232, 203, 565, 632, 8921, 203, 565, 1071, 760, 411, 56, 34, 2407, 32, 56, 34, 24692, 26964, 13349, 2200, 32, 56, 34, 2777, 9494, 13, 288, 203, 3639, 2407, 32, 56, 34, 325, 273, 394, 2407, 29667, 5621, 203, 3639, 309, 261, 902, 2041, 12, 71, 92, 3719, 203, 5411, 364, 261, 2532, 32, 56, 34, 276, 294, 9494, 13, 203, 7734, 309, 261, 902, 2041, 12, 71, 3719, 203, 10792, 325, 18, 1289, 1595, 12, 71, 1769, 203, 3639, 327, 325, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 752, 279, 666, 434, 326, 864, 666, 924, 203, 377, 380, 203, 377, 380, 632, 891, 9494, 225, 326, 666, 1516, 203, 377, 380, 632, 891, 411, 56, 34, 326, 618, 434, 326, 666, 203, 377, 380, 632, 2463, 326, 666, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
49cf45a595245cf86ade32fd50cbd661ed596c33
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/lang/LanguageUtil.java
[ "Apache-2.0" ]
Java
with
null
public static <T> void with(@Nullable T t, @NonNull T def, @NonNull Consumer<T> func) { if (t != null) func.invoke(t); else func.invoke(def); }
/** * run a function with t, or def if t is null * * @param t the value to pass to the function * @param func the function to run * @param def the default value to use in case t is null * @param <T> the type of t */
run a function with t, or def if t is null @param t the value to pass to the function @param func the function to run @param def the default value to use in case t is null @param the type of t
[ "run", "a", "function", "with", "t", "or", "def", "if", "t", "is", "null", "@param", "t", "the", "value", "to", "pass", "to", "the", "function", "@param", "func", "the", "function", "to", "run", "@param", "def", "the", "default", "value", "to", "use", "in", "case", "t", "is", "null", "@param", "the", "type", "of", "t" ]
public static <T> void with(@Nullable T t, @NonNull T def, @NonNull Consumer<T> func) { if (t != null) func.invoke(t); else func.invoke(def); }
[ "public", "static", "<", "T", ">", "void", "with", "(", "@", "Nullable", "T", "t", ",", "@", "NonNull", "T", "def", ",", "@", "NonNull", "Consumer", "<", "T", ">", "func", ")", "{", "if", "(", "t", "!=", "null", ")", "func", ".", "invoke", "(", "t", ")", ";", "else", "func", ".", "invoke", "(", "def", ")", ";", "}" ]
run a function with t, or def if t is null @param t the value to pass to the function @param func the function to run @param def the default value to use in case t is null @param <T> the type of t
[ "run", "a", "function", "with", "t", "or", "def", "if", "t", "is", "null", "@param", "t", "the", "value", "to", "pass", "to", "the", "function", "@param", "func", "the", "function", "to", "run", "@param", "def", "the", "default", "value", "to", "use", "in", "case", "t", "is", "null", "@param", "<T", ">", "the", "type", "of", "t" ]
[]
[ { "param": "t", "type": "T" }, { "param": "def", "type": "T" }, { "param": "func", "type": "Consumer<T>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "t", "type": "T", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "def", "type": "T", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": "Consumer<T>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 411, 56, 34, 918, 598, 26964, 13349, 399, 268, 16, 632, 8921, 399, 1652, 16, 632, 8921, 9326, 32, 56, 34, 1326, 13, 288, 203, 3639, 309,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, 326, 460, 358, 1342, 358, 326, 445, 203, 377, 380, 632, 891, 1326, 326, 445, 358, 1086, 203, 377, 380, 632, 891, 1652, 225, 326, 805, 460, 358, 999, 316, 648, 268, 353, 446, 203, 377, 380, 632, 891, 411, 56, 34, 225, 326, 618, 434, 268, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
49cf45a595245cf86ade32fd50cbd661ed596c33
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/lang/LanguageUtil.java
[ "Apache-2.0" ]
Java
withStr
null
public static <T> void withStr(@Nullable T t, @NonNull String def, @NonNull Consumer<String> func) { if (t != null && !nullOrEmpty(t.toString())) func.invoke(t.toString()); else func.invoke(def); }
/** * run a function with t.toString(), or def if t or t.toString() is null * * @param t the value to pass to the function * @param func the function to run * @param def the default value to use in case t is null * @param <T> the type of t */
run a function with t.toString(), or def if t or t.toString() is null @param t the value to pass to the function @param func the function to run @param def the default value to use in case t is null @param the type of t
[ "run", "a", "function", "with", "t", ".", "toString", "()", "or", "def", "if", "t", "or", "t", ".", "toString", "()", "is", "null", "@param", "t", "the", "value", "to", "pass", "to", "the", "function", "@param", "func", "the", "function", "to", "run", "@param", "def", "the", "default", "value", "to", "use", "in", "case", "t", "is", "null", "@param", "the", "type", "of", "t" ]
public static <T> void withStr(@Nullable T t, @NonNull String def, @NonNull Consumer<String> func) { if (t != null && !nullOrEmpty(t.toString())) func.invoke(t.toString()); else func.invoke(def); }
[ "public", "static", "<", "T", ">", "void", "withStr", "(", "@", "Nullable", "T", "t", ",", "@", "NonNull", "String", "def", ",", "@", "NonNull", "Consumer", "<", "String", ">", "func", ")", "{", "if", "(", "t", "!=", "null", "&&", "!", "nullOrEmpty", "(", "t", ".", "toString", "(", ")", ")", ")", "func", ".", "invoke", "(", "t", ".", "toString", "(", ")", ")", ";", "else", "func", ".", "invoke", "(", "def", ")", ";", "}" ]
run a function with t.toString(), or def if t or t.toString() is null @param t the value to pass to the function @param func the function to run @param def the default value to use in case t is null @param <T> the type of t
[ "run", "a", "function", "with", "t", ".", "toString", "()", "or", "def", "if", "t", "or", "t", ".", "toString", "()", "is", "null", "@param", "t", "the", "value", "to", "pass", "to", "the", "function", "@param", "func", "the", "function", "to", "run", "@param", "def", "the", "default", "value", "to", "use", "in", "case", "t", "is", "null", "@param", "<T", ">", "the", "type", "of", "t" ]
[]
[ { "param": "t", "type": "T" }, { "param": "def", "type": "String" }, { "param": "func", "type": "Consumer<String>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "t", "type": "T", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "def", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": "Consumer<String>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 411, 56, 34, 918, 598, 1585, 26964, 13349, 399, 268, 16, 632, 8921, 514, 1652, 16, 632, 8921, 9326, 32, 780, 34, 1326, 13, 288, 203, 3639, 309, 261, 88, 480, 446, 597, 401, 2011, 12763, 12, 88, 18, 10492, 1435, 3719, 203, 5411, 1326, 18, 14407, 12, 88, 18, 10492, 10663, 203, 3639, 469, 203, 5411, 1326, 18, 14407, 12, 536, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1086, 279, 445, 598, 268, 18, 10492, 9334, 578, 1652, 309, 268, 578, 268, 18, 10492, 1435, 353, 446, 203, 377, 380, 203, 377, 380, 632, 891, 268, 565, 326, 460, 358, 1342, 358, 326, 445, 203, 377, 380, 632, 891, 1326, 326, 445, 358, 1086, 203, 377, 380, 632, 891, 1652, 225, 326, 805, 460, 358, 999, 316, 648, 268, 353, 446, 203, 377, 380, 632, 891, 411, 56, 34, 225, 326, 618, 434, 268, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
49cf45a595245cf86ade32fd50cbd661ed596c33
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/lang/LanguageUtil.java
[ "Apache-2.0" ]
Java
nullSafe
R
@Nullable public static <T, R> R nullSafe(@Nullable T t, @NonNull Function<R, T> func) { try { return func.invoke(t); } catch (NullPointerException e) { return null; } }
/** * dereference a variable null- safe. * Warning: this uses a try/catch under the hood, so all NullPointerExceptions thrown by func will be swallowed. * * @param t the object to do a dereference on * @param func the dereference function, return value is returned * @param <T> the type of t * @param <R> the type to return * @return the dereferenced value, or null if failed */
dereference a variable null- safe. Warning: this uses a try/catch under the hood, so all NullPointerExceptions thrown by func will be swallowed.
[ "dereference", "a", "variable", "null", "-", "safe", ".", "Warning", ":", "this", "uses", "a", "try", "/", "catch", "under", "the", "hood", "so", "all", "NullPointerExceptions", "thrown", "by", "func", "will", "be", "swallowed", "." ]
@Nullable public static <T, R> R nullSafe(@Nullable T t, @NonNull Function<R, T> func) { try { return func.invoke(t); } catch (NullPointerException e) { return null; } }
[ "@", "Nullable", "public", "static", "<", "T", ",", "R", ">", "R", "nullSafe", "(", "@", "Nullable", "T", "t", ",", "@", "NonNull", "Function", "<", "R", ",", "T", ">", "func", ")", "{", "try", "{", "return", "func", ".", "invoke", "(", "t", ")", ";", "}", "catch", "(", "NullPointerException", "e", ")", "{", "return", "null", ";", "}", "}" ]
dereference a variable null- safe.
[ "dereference", "a", "variable", "null", "-", "safe", "." ]
[]
[ { "param": "t", "type": "T" }, { "param": "func", "type": "Function<R, T>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "t", "type": "T", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": "Function<R, T>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 13349, 203, 565, 1071, 760, 411, 56, 16, 534, 34, 534, 446, 9890, 26964, 13349, 399, 268, 16, 632, 8921, 4284, 32, 54, 16,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, 19, 14683, 3613, 326, 366, 4773, 16, 1427, 777, 10108, 87, 6718, 635, 1326, 903, 506, 1352, 8151, 18, 203, 377, 380, 203, 377, 380, 632, 891, 268, 565, 326, 733, 358, 741, 279, 27794, 603, 203, 377, 380, 632, 891, 1326, 326, 27794, 445, 16, 327, 460, 353, 2106, 203, 377, 380, 632, 891, 411, 56, 34, 225, 326, 618, 434, 268, 203, 377, 380, 632, 891, 411, 54, 34, 225, 326, 618, 358, 327, 203, 377, 380, 632, 2463, 326, 27794, 72, 460, 16, 578, 446, 309, 2535, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
49cf45a595245cf86ade32fd50cbd661ed596c33
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/lang/LanguageUtil.java
[ "Apache-2.0" ]
Java
nullSafe
R
@NonNull public static <T, R> R nullSafe(@Nullable T t, @NonNull Function<R, T> func, @NonNull R def) { try { R ret = func.invoke(t); return ret != null ? ret : def; } catch (NullPointerException e) { return def; } }
/** * dereference a variable null- safe, with default * Warning: this uses a try/catch under the hood, so all NullPointerExceptions thrown by func will be swallowed. * * @param t the object to do a dereference on * @param func the dereference function, return value is returned * @param <T> the type of t * @param <R> the type to return * @return the dereferenced value, or def if failed */
dereference a variable null- safe, with default Warning: this uses a try/catch under the hood, so all NullPointerExceptions thrown by func will be swallowed.
[ "dereference", "a", "variable", "null", "-", "safe", "with", "default", "Warning", ":", "this", "uses", "a", "try", "/", "catch", "under", "the", "hood", "so", "all", "NullPointerExceptions", "thrown", "by", "func", "will", "be", "swallowed", "." ]
@NonNull public static <T, R> R nullSafe(@Nullable T t, @NonNull Function<R, T> func, @NonNull R def) { try { R ret = func.invoke(t); return ret != null ? ret : def; } catch (NullPointerException e) { return def; } }
[ "@", "NonNull", "public", "static", "<", "T", ",", "R", ">", "R", "nullSafe", "(", "@", "Nullable", "T", "t", ",", "@", "NonNull", "Function", "<", "R", ",", "T", ">", "func", ",", "@", "NonNull", "R", "def", ")", "{", "try", "{", "R", "ret", "=", "func", ".", "invoke", "(", "t", ")", ";", "return", "ret", "!=", "null", "?", "ret", ":", "def", ";", "}", "catch", "(", "NullPointerException", "e", ")", "{", "return", "def", ";", "}", "}" ]
dereference a variable null- safe, with default Warning: this uses a try/catch under the hood, so all NullPointerExceptions thrown by func will be swallowed.
[ "dereference", "a", "variable", "null", "-", "safe", "with", "default", "Warning", ":", "this", "uses", "a", "try", "/", "catch", "under", "the", "hood", "so", "all", "NullPointerExceptions", "thrown", "by", "func", "will", "be", "swallowed", "." ]
[]
[ { "param": "t", "type": "T" }, { "param": "func", "type": "Function<R, T>" }, { "param": "def", "type": "R" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "t", "type": "T", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": "Function<R, T>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "def", "type": "R", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 8921, 203, 565, 1071, 760, 411, 56, 16, 534, 34, 534, 446, 9890, 26964, 13349, 399, 268, 16, 632, 8921, 4284, 32, 54, 16, 399, 34, 1326, 16, 632, 8921, 534, 1652, 13, 288, 203, 3639, 775, 288, 203, 5411, 534, 325, 273, 1326, 18, 14407, 12, 88, 1769, 203, 5411, 327, 325, 480, 446, 692, 325, 294, 1652, 31, 203, 3639, 289, 1044, 261, 2041, 9992, 425, 13, 288, 203, 5411, 327, 1652, 31, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 27794, 279, 2190, 446, 17, 4183, 16, 598, 805, 203, 377, 380, 9728, 30, 333, 4692, 279, 775, 19, 14683, 3613, 326, 366, 4773, 16, 1427, 777, 10108, 87, 6718, 635, 1326, 903, 506, 1352, 8151, 18, 203, 377, 380, 203, 377, 380, 632, 891, 268, 565, 326, 733, 358, 741, 279, 27794, 603, 203, 377, 380, 632, 891, 1326, 326, 27794, 445, 16, 327, 460, 353, 2106, 203, 377, 380, 632, 891, 411, 56, 34, 225, 326, 618, 434, 268, 203, 377, 380, 632, 891, 411, 54, 34, 225, 326, 618, 358, 327, 203, 377, 380, 632, 2463, 326, 27794, 72, 460, 16, 578, 1652, 309, 2535, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
49cf45a595245cf86ade32fd50cbd661ed596c33
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/lang/LanguageUtil.java
[ "Apache-2.0" ]
Java
str
String
@Nullable public static String str(@Nullable Object o) { if (isNull(o)) return null; return String.valueOf(o); }
/** * convert the object into a string, using String.valueOf * * @param o the object to convert * @return the string */
convert the object into a string, using String.valueOf @param o the object to convert @return the string
[ "convert", "the", "object", "into", "a", "string", "using", "String", ".", "valueOf", "@param", "o", "the", "object", "to", "convert", "@return", "the", "string" ]
@Nullable public static String str(@Nullable Object o) { if (isNull(o)) return null; return String.valueOf(o); }
[ "@", "Nullable", "public", "static", "String", "str", "(", "@", "Nullable", "Object", "o", ")", "{", "if", "(", "isNull", "(", "o", ")", ")", "return", "null", ";", "return", "String", ".", "valueOf", "(", "o", ")", ";", "}" ]
convert the object into a string, using String.valueOf @param o the object to convert @return the string
[ "convert", "the", "object", "into", "a", "string", "using", "String", ".", "valueOf", "@param", "o", "the", "object", "to", "convert", "@return", "the", "string" ]
[]
[ { "param": "o", "type": "Object" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "o", "type": "Object", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 13349, 203, 565, 1071, 760, 514, 609, 26964, 13349, 1033, 320, 13, 288, 203, 3639, 309, 261, 291, 2041, 12, 83, 3719, 203, 5411, 327, 446, 31, 203, 203, 3639, 327, 514, 18, 1132, 951, 12, 83, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1765, 326, 733, 1368, 279, 533, 16, 1450, 514, 18, 1132, 951, 203, 377, 380, 203, 377, 380, 632, 891, 320, 326, 733, 358, 1765, 203, 377, 380, 632, 2463, 326, 533, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
49cf45a595245cf86ade32fd50cbd661ed596c33
Tenshiorg/Extensions-Lib
extensionsLib/src/main/java/io/github/shadow578/tenshi/extensionslib/lang/LanguageUtil.java
[ "Apache-2.0" ]
Java
concat
String
@NonNull public static String concat(@NonNull String... sx) { StringBuilder sb = new StringBuilder(); for (String s : sx) sb.append(s); return sb.toString(); }
/** * concatenate multiple strings * * @param sx the strings to concatenate * @return the concatenated string */
concatenate multiple strings @param sx the strings to concatenate @return the concatenated string
[ "concatenate", "multiple", "strings", "@param", "sx", "the", "strings", "to", "concatenate", "@return", "the", "concatenated", "string" ]
@NonNull public static String concat(@NonNull String... sx) { StringBuilder sb = new StringBuilder(); for (String s : sx) sb.append(s); return sb.toString(); }
[ "@", "NonNull", "public", "static", "String", "concat", "(", "@", "NonNull", "String", "...", "sx", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "String", "s", ":", "sx", ")", "sb", ".", "append", "(", "s", ")", ";", "return", "sb", ".", "toString", "(", ")", ";", "}" ]
concatenate multiple strings @param sx the strings to concatenate @return the concatenated string
[ "concatenate", "multiple", "strings", "@param", "sx", "the", "strings", "to", "concatenate", "@return", "the", "concatenated", "string" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 8921, 203, 565, 1071, 760, 514, 3835, 26964, 8921, 514, 2777, 13280, 13, 288, 203, 3639, 3225, 2393, 273, 394, 3225, 5621, 203, 3639, 364, 261, 780, 272, 294, 13280, 13, 203, 5411, 2393, 18, 6923, 12, 87, 1769, 203, 3639, 327, 2393, 18, 10492, 5621, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 11361, 3229, 2064, 203, 377, 380, 203, 377, 380, 632, 891, 13280, 326, 2064, 358, 11361, 203, 377, 380, 632, 2463, 326, 22080, 533, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]