public static CacheDirectiveInfoExpirationProto convert( CacheDirectiveInfo.Expiration expiration) { return CacheDirectiveInfoExpirationProto.newBuilder() .setIsRelative(expiration.isRelative()) .setMillis(expiration.getMillis()) .build(); }
public static CacheDirectiveInfo.Expiration convert( CacheDirectiveInfoExpirationProto proto) { if (proto.getIsRelative()) { return CacheDirectiveInfo.Expiration.newRelative(proto.getMillis()); } return CacheDirectiveInfo.Expiration.newAbsolute(proto.getMillis()); }