Google is committed to advancing racial equity for Black communities. See how.

ClusterEventUploader

public abstract class ClusterEventUploader
extends Object implements IClusterEventUploader<T extends IClusterEvent>

java.lang.Object
   ↳ com.android.tradefed.cluster.ClusterEventUploader<T extends com.android.tradefed.cluster.IClusterEvent>


ClusterEventUploader class, which uploads IClusterEvent to TFC.

Summary

Public constructors

ClusterEventUploader()

Public methods

void flush()

Force an upload of all events queued.

long getEventUploadInterval()

Get the upload interval.

int getMaxBatchSize()

Get the maximum batch size used when uploading events.

void postEvent(T event)

Posts an event to TFC.

void setEventUploadInterval(long interval)

Set how often we upload events to TFC.

void setMaxBatchSize(int batchSize)

Get the maximum number of events to upload at once.

Protected methods

abstract void doUploadEvents( events)

Public constructors

ClusterEventUploader

public ClusterEventUploader ()

Public methods

flush

public void flush ()

Force an upload of all events queued.

getEventUploadInterval

public long getEventUploadInterval ()

Get the upload interval.

Returns
long the upload interval in ms.

getMaxBatchSize

public int getMaxBatchSize ()

Get the maximum batch size used when uploading events.

Returns
int the maximum batch size.

postEvent

public void postEvent (T event)

Posts an event to TFC. This queues the event to be uploaded. Events will be batched and uploaded.

Parameters
event T: the event to upload

setEventUploadInterval

public void setEventUploadInterval (long interval)

Set how often we upload events to TFC.

Parameters
interval long: in ms for events to be uploaded to TFC.

setMaxBatchSize

public void setMaxBatchSize (int batchSize)

Get the maximum number of events to upload at once.

Parameters
batchSize int: the maximum number of events to upload at once.

Protected methods

doUploadEvents

protected abstract void doUploadEvents ( events)

Parameters
events