Package fr.ifremer.isisfish.datastore
Class SimulationInformation
java.lang.Object
fr.ifremer.isisfish.datastore.SimulationInformation
Cette classe permet de conserver des informations sur le deroulement d'une
simulation. La plupart des informations sont automatiquement renseignees,
mais l'utilisateur peut lui aussi ajouter des informations avec la methode
addInformation(String)
.- Version:
- $Revision$ Last update: $Date$ by : $Author$
- Author:
- poussin
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllExportSize
(long size) void
addAllExportTime
(long time) void
addExportException
(String exportName, Throwable eee) void
addExportSize
(String exportName, long size) void
addExportTime
(String exportName, long time) void
addInformation
(String info) Add additional simulation information.void
addRuleInitTime
(String ruleName, long time) Add rule init time.void
addRulePostTime
(String ruleName, long time) Add rule post operation time.void
addRulePreTime
(String ruleName, long time) Add rule pre operation time time.protected void
addRuleTime
(String keyName, String ruleName, long time) Add rule time.protected String
long
long
Get all export exception in map.long
getExportSize
(String exportName) Get all export size in map.Deprecated.long
getExportTime
(String exportName) Get all export time in map.Deprecated.since 3.2.0.5, usegetInformation()
insteadprotected String
Get other information.protected long
long
getRuleInitTime
(String ruleName) Get rule init operation time.Get rules names.long
getRulePostTime
(String ruleName) Get rule post operation time.long
getRulePreTime
(String ruleName) Get rule pre operation time.protected long
getRuleTime
(String prefixName, String ruleName) Get rule operation time.Get the date of simulation start.Get the date of simulation start.boolean
hasError()
Returntrue
if an exception has been set.void
Si les simulations ont été effectuée à distance, l'instance de SimulationInformation doit se recharger avec les nouvelles informations à jour en fin de simulation.void
void
setException
(Throwable eee) protected void
void
void
setSimulationEnd
(Date date) void
setSimulationStart
(Date date) void
protected void
store()
toString()
-
Field Details
-
info
-
file
-
-
Constructor Details
-
SimulationInformation
Constructor. If file already exists, load his content into current instance.- Parameters:
file
- simulation information output file
-
-
Method Details
-
reloadLocal
public void reloadLocal()Si les simulations ont été effectuée à distance, l'instance de SimulationInformation doit se recharger avec les nouvelles informations à jour en fin de simulation. -
toString
-
store
protected void store() -
setInfo
-
getSimulationStart
Get the date of simulation start.- Returns:
- simulation start date
-
setSimulationStart
-
getSimulationEnd
Get the date of simulation start.- Returns:
- simulation end date
-
setSimulationEnd
-
addExportTime
-
addExportSize
-
addExportException
-
addAllExportTime
public void addAllExportTime(long time) -
addAllExportSize
public void addAllExportSize(long size) -
getExportTimes
Get all export time in map.- Returns:
- a map with all export time
-
getExportSizes
Get all export size in map.- Returns:
- a map with all export size
-
getExportExceptions
Get all export exception in map.- Returns:
- a map with all export exception
-
getExportTime
Deprecated.since 3.2.0.5, usegetExportTimes()
insteadGet all export time in map.- Returns:
- a map with all export time
-
getLong
-
getExportTime
-
getExportSize
-
getAllExportTime
public long getAllExportTime() -
getAllExportSize
public long getAllExportSize() -
addRuleTime
Add rule time. If a time already exists for ruleName, add time to previous time. (usefull because pre/post action are called multiples time)- Parameters:
keyName
- (ie#RULE_TIME_INIT
,#RULE_TIME_PRE
,#RULE_TIME_POST
)ruleName
- rule nametime
- time to add- Since:
- 3.2.0.5
-
addRuleInitTime
Add rule init time. If a time already exists for ruleName, add time to previous time.- Parameters:
ruleName
- rule nametime
- time to add- Since:
- 3.2.0.5
-
addRulePreTime
Add rule pre operation time time. If a time already exists for ruleName, add time to previous time.- Parameters:
ruleName
- rule nametime
- time to add- Since:
- 3.2.0.5
-
addRulePostTime
Add rule post operation time. If a time already exists for ruleName, add time to previous time.- Parameters:
ruleName
- rule nametime
- time to add- Since:
- 3.2.0.5
-
getRuleInitTime
Get rule init operation time.- Parameters:
ruleName
- rule name- Returns:
- time
- Since:
- 3.2.0.5
-
getRulePreTime
Get rule pre operation time.- Parameters:
ruleName
- rule name- Returns:
- time
- Since:
- 3.2.0.5
-
getRulePostTime
Get rule post operation time.- Parameters:
ruleName
- rule name- Returns:
- time
- Since:
- 3.2.0.5
-
getRuleTime
Get rule operation time.- Parameters:
ruleName
- rule name- Since:
- 3.2.0.5
-
getRuleNames
Get rules names.- Returns:
- a map with all export time
-
getStatistic
-
setStatistic
-
getComputeResult
-
setComputeResult
-
getOptimizationUsage
-
setOptimizationUsage
-
getException
-
setException
-
exceptionToString
-
hasError
public boolean hasError()Returntrue
if an exception has been set.- Returns:
true
if there is an exception
-
getInfomation
Deprecated.since 3.2.0.5, usegetInformation()
instead- Returns:
- other information
-
getInformation
Get other information.- Returns:
- other information
-
addInformation
Add additional simulation information.- Parameters:
info
- new info
-
getExportTimes()
instead