public class MongoResultService extends AbstractResultService
ResultService.EventSummary, ResultService.ResultHandler| Constructor and Description |
|---|
MongoResultService(org.springframework.data.mongodb.core.MongoTemplate mongo,
String collection)
Construct a provider that works using the given Mongo instance and
collection name.
|
| Modifier and Type | Method and Description |
|---|---|
long |
countEventsByFailure() |
long |
countEventsByName(String name)
Count the number of previously-completed events with the given name.
|
long |
countEventsBySuccess() |
String |
getDataLocation()
Get details on the location of the results that the service is accessing
|
List<String> |
getEventNames()
Get a discrete list of event names from across all the results
|
long |
getMaxStartTime() |
long |
getMinStartTime() |
List<EventRecord> |
getResults(boolean successOrFail,
int skip,
int limit)
Retrieve a page of event results matching the success property.
|
List<EventRecord> |
getResults(long startTime,
String eventName,
Boolean successOrFail,
int skip,
int limit)
Retrieve a page of event results using a time window
|
List<EventRecord> |
getResults(String eventName,
int skip,
int limit)
Retrieve a page of event results by event name
|
List<EventRecord> |
getResultsForSession(String eventSessionId,
int skip,
int limit)
Retrieve a page of event results by event session ID
|
EventRecord |
recordResult(EventRecord result)
Simply store an event for later use
|
getResults, getResultspublic MongoResultService(org.springframework.data.mongodb.core.MongoTemplate mongo,
String collection)
mongo - the MongoDB template to usecollection - the name of the MongoDB collectionpublic String getDataLocation()
ResultServicepublic EventRecord recordResult(EventRecord result)
ResultServiceresult - the result to storepublic List<EventRecord> getResults(String eventName, int skip, int limit)
ResultServiceeventName - the name of the event as recordedskip - the number of results to skip (for paging)limit - the number of results to retrievepublic List<EventRecord> getResults(boolean successOrFail, int skip, int limit)
ResultServicepublic List<EventRecord> getResultsForSession(String eventSessionId, int skip, int limit)
ResultServiceeventSessionId - the event session IDskip - the number of results to skip (for paging)limit - the number of results to retrievepublic List<EventRecord> getResults(long startTime, String eventName, Boolean successOrFail, int skip, int limit)
ResultServicestartTime - the first event time (inclusive, milliseconds)eventName - the name of the event to use or null for all event namessuccessOrFail - true for success only or false for failures (null for all)public List<String> getEventNames()
ResultServicepublic long countEventsByName(String name)
ResultServicename - the name of the event as recoredpublic long countEventsBySuccess()
public long countEventsByFailure()
public long getMinStartTime()
public long getMaxStartTime()
Copyright © 2014. All rights reserved.