Here you can find the source of getExpirationMillisAbs(int recordExpirationTimestamp)
Parameter | Description |
---|---|
recordExpirationTimestamp | Timestamp when record expires, in seconds since Jan 01 2010 00:00:00 GMT (absolute) |
public static long getExpirationMillisAbs(int recordExpirationTimestamp)
//package com.java2s; //License from project: Apache License public class Main { public static int AS_TIMEBASE_SEC = 1262304000; /**//from ww w . j a v a2 s.c om * @param recordExpirationTimestamp Timestamp when record expires, in seconds since Jan 01 2010 00:00:00 GMT (absolute) * @return Expiration time in millis */ public static long getExpirationMillisAbs(int recordExpirationTimestamp) { long timestamp; // Aerospike expiry settings are messed up: you put in -1 and get back 0 if (recordExpirationTimestamp == 0) { timestamp = -1; // default expiration setting: -1 - no expiration set } else { // convert record expiration time (seconds from 01/01/2010 0:0:0 GMT) // to java epoch time in milliseconds timestamp = 1000L * (AS_TIMEBASE_SEC + recordExpirationTimestamp); } return timestamp; } }