org.gcube.common.accounting.node.util
Class Util
java.lang.Object
org.gcube.common.accounting.node.util.Util
public class Util
- extends java.lang.Object
- Author:
- Andrea Manzi(CERN)
Constructor Summary |
Util(GCUBELog logger)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DATE_FORMAT
public static final java.lang.String DATE_FORMAT
- See Also:
- Constant Field Values
DATE_FORMAT_DAY
public static final java.lang.String DATE_FORMAT_DAY
- See Also:
- Constant Field Values
format
public static java.text.SimpleDateFormat format
format_day
public static java.text.SimpleDateFormat format_day
Util
public Util(GCUBELog logger)
generateDateIntervals
public java.util.ArrayList<DateInterval> generateDateIntervals(PersistenceAdapter adapter,
java.lang.Long interval)
- generateDateIntervals
- Parameters:
adapter
- interval
-
- Returns:
matchIntervalsWithLogFiles
public java.util.HashMap<java.io.File,java.util.ArrayList<DateInterval>> matchIntervalsWithLogFiles(java.io.File[] files,
java.util.ArrayList<DateInterval> inputIntervals)
- Parameters:
files
- inputIntervals
-
- Returns:
updateAccoutingInfo
public void updateAccoutingInfo(java.util.ArrayList<org.gcube.messaging.common.messages.NodeAccountingMessage<org.gcube.messaging.common.messages.records.IntervalRecord>> messages,
PersistenceAdapter adapter,
DateInterval interval)
throws java.lang.Exception
- Throws:
java.lang.Exception
createAccountingInfo
public java.util.ArrayList<org.gcube.messaging.common.messages.NodeAccountingMessage<org.gcube.messaging.common.messages.records.IntervalRecord>> createAccountingInfo(java.io.File input,
DateInterval interval)
throws java.io.IOException,
java.lang.Exception
- Throws:
java.io.IOException
java.lang.Exception
getClazz
public static java.lang.String getClazz(java.lang.String line)
getName
public static java.lang.String getName(java.lang.String line)