/** * Return the timestamp which will be used to execute the query. The uri * query parameter <code>timestamp</code> may be used to communicate the * desired commit time against which the query will be issued. If that uri * query parameter is not given then the default configured commit time will * be used. Applications may create protocols for sharing interesting commit * times as reported by {@link IAtomicStore#commit()} or by a distributed * data loader (for scale-out). * * @see QueryServlet#ATTR_TIMESTAMP; */ protected long getTimestamp(final HttpServletRequest req) { final String timestamp = req.getParameter(QueryServlet.ATTR_TIMESTAMP); if (timestamp == null) { return getConfig(getServletContext()).timestamp; } return Long.valueOf(timestamp); }
/** * Return the timestamp which will be used to execute the query. The uri * query parameter <code>timestamp</code> may be used to communicate the * desired commit time against which the query will be issued. If that uri * query parameter is not given then the default configured commit time will * be used. Applications may create protocols for sharing interesting commit * times as reported by {@link IAtomicStore#commit()} or by a distributed * data loader (for scale-out). * * @see QueryServlet#ATTR_TIMESTAMP; */ protected long getTimestamp(final HttpServletRequest req) { final String timestamp = req.getParameter(QueryServlet.ATTR_TIMESTAMP); if (timestamp == null) { return getConfig(getServletContext()).timestamp; } return Long.valueOf(timestamp); }