com.pmease.quickbuild.measurement
Class MeasurementUtils
java.lang.Object
com.pmease.quickbuild.measurement.MeasurementUtils
public class MeasurementUtils
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RAW_TABLE_MAP
public static final com.google.common.collect.BiMap<java.lang.Integer,java.lang.Class<? extends MeasurementData>> RAW_TABLE_MAP
STORED_DAYS
public static final int STORED_DAYS
- See Also:
- Constant Field Values
TABLES_PER_DAY
public static final int TABLES_PER_DAY
- See Also:
- Constant Field Values
BUFFER_TABLES
public static final int BUFFER_TABLES
- See Also:
- Constant Field Values
LIVE_TABLES
public static final int LIVE_TABLES
- See Also:
- Constant Field Values
TABLE_COUNT
public static final int TABLE_COUNT
- See Also:
- Constant Field Values
MILLIS_PER_TABLE
public static final long MILLIS_PER_TABLE
- See Also:
- Constant Field Values
PURGE_RAW
public static final long PURGE_RAW
- See Also:
- Constant Field Values
PURGE_1H
public static final long PURGE_1H
- See Also:
- Constant Field Values
PURGE_6H
public static final long PURGE_6H
- See Also:
- Constant Field Values
PURGE_1D
public static final long PURGE_1D
- See Also:
- Constant Field Values
MeasurementUtils
public MeasurementUtils()
getTableIndex
public static int getTableIndex(long time)
getRawTableClass
public static java.lang.Class<? extends MeasurementData> getRawTableClass(long time)
getTableIndex
public static int getTableIndex(java.lang.Class<? extends MeasurementData> clazz)
isRawTable
public static boolean isRawTable(java.lang.Class<? extends MeasurementData> clazz)
getNextRotationTime
public static java.lang.String getNextRotationTime()
getTableName
public static java.lang.String getTableName(java.lang.Class<? extends MeasurementData> clazz)
getTableNameIndex
public static int getTableNameIndex(java.lang.Class<? extends MeasurementData> clazz)
getDeadTableIndex
public static int getDeadTableIndex(long time)
getAllRawTables
public static java.lang.Class<? extends MeasurementData>[] getAllRawTables(int startIndex)
- The raw tables starting at the specified index. Can be useful for
getting the tables in a necessary time order (like oldest data first).
- Parameters:
startIndex
- >= 0. If >= TABLE_COUNT normalized via modulo.
- Returns:
- array of raw table classes starting with the table with the specified index.
getDeadTable
public static java.lang.Class<? extends MeasurementData> getDeadTable(long time)
getTables
public static java.lang.Class<? extends MeasurementData>[] getTables(long beginTime,
long endTime)
getTables
public static java.lang.Class<? extends MeasurementData>[] getTables(long beginTime,
long endTime,
long now)
getTableType
public static MeasurementDataManager.TableType getTableType(long beginTime,
long endTime)
getTableType
public static MeasurementDataManager.TableType getTableType(long beginTime,
long endTime,
long now)
getCurrentRawTableIndex
public static int getCurrentRawTableIndex()
getRawTable
public static java.lang.Class<? extends MeasurementData> getRawTable(int index)
getRawTimePeriodStart
public static long getRawTimePeriodStart(long end)
isRawTimePeriod
public static boolean isRawTimePeriod(long beginTime)
today
public static com.google.common.collect.Range<java.lang.Long> today()
lastHour
public static com.google.common.collect.Range<java.lang.Long> lastHour()
lastSixHours
public static com.google.common.collect.Range<java.lang.Long> lastSixHours()
lastTwelveHours
public static com.google.common.collect.Range<java.lang.Long> lastTwelveHours()
lastWeek
public static com.google.common.collect.Range<java.lang.Long> lastWeek()
lastMonth
public static com.google.common.collect.Range<java.lang.Long> lastMonth()
Copyright © 2005-2010 PMEase Inc. All Rights Reserved.