Class RunnableCheckBase<T extends Check>
- java.lang.Object
-
- org.openstreetmap.atlas.checks.distributed.RunnableCheckBase<T>
-
- Type Parameters:
T- this would either be aChecktype
- Direct Known Subclasses:
RunnableCheck
public abstract class RunnableCheckBase<T extends Check> extends java.lang.ObjectBase class to with helper methods forRunnableCheck
-
-
Constructor Summary
Constructors Constructor Description RunnableCheckBase(java.lang.String country, T check, java.lang.Iterable<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> objects, MapRouletteClient client)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddTask(CheckFlag flag)Adds aCheckFlagtoMapRouletteClientprotected TgetCheck()protected MapRouletteClientgetClient()protected java.lang.StringgetCountry()EventServicegetEventService()protected java.lang.StringgetName()protected java.lang.Iterable<org.openstreetmap.atlas.geography.atlas.items.AtlasObject>getObjects()protected voiduploadTasks()UploadsCheckFlags to MapRoulette in a separate thread.
-
-
-
Constructor Detail
-
RunnableCheckBase
public RunnableCheckBase(java.lang.String country, T check, java.lang.Iterable<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> objects, MapRouletteClient client)Default constructor- Parameters:
country- country that is being processedcheck- check that is being executedobjects-AtlasObjects that are going to be executedclient-MapRouletteClientthat will upload the tasks to MapRoulette
-
-
Method Detail
-
getEventService
public EventService getEventService()
- Returns:
- The
EventServiceevents are published to
-
addTask
protected void addTask(CheckFlag flag)
Adds aCheckFlagtoMapRouletteClient- Parameters:
flag-CheckFlagto create MapRoulette task
-
getCheck
protected T getCheck()
-
getClient
protected MapRouletteClient getClient()
-
getCountry
protected java.lang.String getCountry()
-
getName
protected java.lang.String getName()
-
getObjects
protected java.lang.Iterable<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> getObjects()
-
uploadTasks
protected void uploadTasks()
UploadsCheckFlags to MapRoulette in a separate thread. Thread will timeout if it does not complete by given timeout time.
-
-