org.alfresco.bm.event.mongo
Class MongoResultService

java.lang.Object
  extended by org.alfresco.bm.event.mongo.MongoResultService
All Implemented Interfaces:
org.alfresco.bm.event.ResultService

public class MongoResultService
extends Object
implements org.alfresco.bm.event.ResultService

A Mongo-based implementation of the results for benchmark test runs.

Since:
1.0
Author:
Derek Hulley

Constructor Summary
MongoResultService(org.springframework.data.mongodb.core.MongoTemplate mongo, String collection)
          Construct a provider that works using the given Mongo instance and collection name.
 
Method Summary
 long countEventsByName(String name)
           
 List<org.alfresco.bm.event.EventRecord> findEventsByName(String name, int skip, int limit)
           
 org.alfresco.bm.event.EventRecord recordResult(org.alfresco.bm.event.EventRecord result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MongoResultService

public MongoResultService(org.springframework.data.mongodb.core.MongoTemplate mongo,
                          String collection)
Construct a provider that works using the given Mongo instance and collection name.

Parameters:
mongo - the MongoDB template to use
collection - the name of the MongoDB collection
Method Detail

recordResult

public org.alfresco.bm.event.EventRecord recordResult(org.alfresco.bm.event.EventRecord result)
Specified by:
recordResult in interface org.alfresco.bm.event.ResultService

findEventsByName

public List<org.alfresco.bm.event.EventRecord> findEventsByName(String name,
                                                                int skip,
                                                                int limit)
Specified by:
findEventsByName in interface org.alfresco.bm.event.ResultService

countEventsByName

public long countEventsByName(String name)
Specified by:
countEventsByName in interface org.alfresco.bm.event.ResultService


Copyright © 2012. All Rights Reserved.