/************************************************************************* * * * SignServer: The OpenSource Automated Signing Server * * * * This software is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or any later version. * * * * See terms of license at gnu.org. * * * *************************************************************************/ package org.signserver.server.statistics; import java.util.Date; import java.util.HashMap; import java.util.Map; /** * An Event is the base element in collecting statistics. * *
This base class records when in time the event started and * when it stopped for a particular workerId. It is possible * to extend the statistics collection even further adding * custom data to the event specific for a particular worker.
* *To add custom data just define a type to call it and * use the addCustomData method. The type should be unique and * supported by the tool used to review the statistics.
* *It's main methods are start() and stop() that should * be called whenever the particular event have started * and when it have stopped.
* * @author Philip Vendil 28 apr 2008 * @version $Id: Event.java 3372 2013-02-19 16:04:05Z malu9369 $ */ public class Event { private Date startTimeStamp; private Date endTimeStamp; private int workerId = 0; private Map