mitreid-connect
|
公開メンバ関数 | |
AbstractPageOperationTemplate (String operationName) | |
AbstractPageOperationTemplate (int maxPages, long maxTime, String operationName) | |
void | execute () |
abstract Collection< T > | fetchPage () |
int | getMaxPages () |
void | setMaxPages (int maxPages) |
long | getMaxTime () |
void | setMaxTime (long maxTime) |
boolean | isSwallowExceptions () |
void | setSwallowExceptions (boolean swallowExceptions) |
String | getOperationName () |
void | setOperationName (String operationName) |
限定公開メンバ関数 | |
abstract void | doOperation (T item) |
void | finalReport (int operationsCompleted, int exceptionsSwallowedCount, Set< String > exceptionsSwallowedClasses) |
非公開変数類 | |
int | maxPages |
long | maxTime |
boolean | swallowExceptions = true |
String | operationName = "" |
静的非公開変数類 | |
static final Logger | logger = LoggerFactory.getLogger(AbstractPageOperationTemplate.class) |
static int | DEFAULT_MAX_PAGES = 1000 |
static long | DEFAULT_MAX_TIME_MILLIS = 600000L |
Abstract class for performing an operation on a potentially large number of items by paging through the items in discreet chunks.
<T> | the type parameter |
|
inline |
default constructor which sets the value of maxPages and maxTime to DEFAULT_MAX_PAGES and DEFAULT_MAX_TIME_MILLIS respectively
|
inline |
Instantiates a new AbstractPageOperationTemplate with the given maxPages and maxTime
maxPages | the maximum number of pages to fetch. |
maxTime | the maximum execution time. |
|
abstractprotected |
method responsible for performing desired operation on a fetched page item.
item | the item |
|
inline |
Execute the operation on each member of a page of results retrieved through the fetch method. the method will execute until either the maxPages or maxTime limit is reached or until the fetch method returns no more results. Exceptions thrown performing the operation on the item will be swallowed if the swallowException (default true) field is set true.
|
abstract |
method responsible for fetching a page of items.
|
inlineprotected |
Method responsible for final report of progress.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
operationName | the operationName to set |
|
inline |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
int specifying the maximum number of pages which should be fetched before execution should terminate
|
private |
long specifying the maximum execution time in milliseconds
|
private |
String that is used for logging in final tallies.
|
private |
boolean specifying whether or not Exceptions incurred performing the operation should be swallowed during execution default true.