BatchChannel
public
class
BatchChannel
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.result.resultdb.BatchChannel<T> |
Helper class to batch upload test result and artifacts.
Summary
Nested classes | |
|---|---|
interface |
BatchChannel.BatchUploadAction<T>
Action to be performed when a batch of items is ready to be uploaded. |
Public constructors | |
|---|---|
BatchChannel(int maxBatchSize, String itemName, BatchUploadAction<T> batchUploadAction)
|
|
Public methods | |
|---|---|
void
|
enqueue(T item)
|
void
|
finalizeUpload()
|
void
|
forceUpload()
Upload all items currently in the queue. |
Public constructors
BatchChannel
public BatchChannel (int maxBatchSize,
String itemName,
BatchUploadAction<T> batchUploadAction)| Parameters | |
|---|---|
maxBatchSize |
int |
itemName |
String |
batchUploadAction |
BatchUploadAction |
Public methods
enqueue
public void enqueue (T item)
| Parameters | |
|---|---|
item |
T |
| Throws | |
|---|---|
InterruptedException |
|
finalizeUpload
public void finalizeUpload ()
| Throws | |
|---|---|
InterruptedException |
|
forceUpload
public void forceUpload ()
Upload all items currently in the queue. This is a blocking call that waits for all items enqueued previously to be uploaded. Calling this method in mBatchUploadAction of the same instance will cause deadlock.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-06-22 UTC.