Java Code Examples for java.time.ZonedDateTime#until()
The following examples show how to use
java.time.ZonedDateTime#until() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IndexEntry.java From vind with Apache License 2.0 | 5 votes |
public IndexEntry(Application application, ZonedDateTime start, ZonedDateTime end, long queryTime, Session session, List<Document> docs) { this.application = application; this.session = session; this.timeStamp = start; this.documentIds = docs.stream().map( doc -> doc.getId()).collect(Collectors.toList()); this.response = new Response(-1, queryTime, start.until(end, ChronoUnit.MILLIS )); }
Example 2
Source File: IndexEntry.java From vind with Apache License 2.0 | 5 votes |
public IndexEntry(Application application, ZonedDateTime start, ZonedDateTime end, long queryTime, long elapsedTime, Session session, List<Document> docs) { this.application = application; this.session = session; this.timeStamp = start; this.documentIds = docs.stream().map( doc -> doc.getId()).collect(Collectors.toList()); this.response = new Response(-1, queryTime, start.until(end, ChronoUnit.MILLIS )); this.response.setElapsedTime(elapsedTime); }
Example 3
Source File: UpdateEntry.java From vind with Apache License 2.0 | 5 votes |
public UpdateEntry(Application application, ZonedDateTime start, ZonedDateTime end, Session session, Update update, Boolean success) { this.application = application; this.session = session; this.timeStamp = start; this.success = success; this.request = new UpdateRequest(update); this.response = new Response(-1, -1, start.until(end, ChronoUnit.MILLIS )); }
Example 4
Source File: GetEntry.java From vind with Apache License 2.0 | 5 votes |
public GetEntry(Application application, ZonedDateTime start, ZonedDateTime end, long queryTime, Session session, List<String> docs, long numResult) { this.application = application; this.session = session; this.timeStamp = start; this.documentIds = docs; this.response = new Response(numResult, queryTime, start.until(end, ChronoUnit.MILLIS )); }
Example 5
Source File: GetEntry.java From vind with Apache License 2.0 | 5 votes |
public GetEntry(Application application, ZonedDateTime start, ZonedDateTime end, long queryTime, long elapsedTime, Session session, List<String> docs, long numResult) { this.application = application; this.session = session; this.timeStamp = start; this.documentIds = docs; this.response = new Response(numResult, queryTime, start.until(end, ChronoUnit.MILLIS )); this.response.setElapsedTime(elapsedTime); }
Example 6
Source File: SuggestionEntry.java From vind with Apache License 2.0 | 5 votes |
public SuggestionEntry(SearchServer server, DocumentFactory factory, Application application, ExecutableSuggestionSearch search, SuggestionResult result, ZonedDateTime start, ZonedDateTime end, long queryTime, Session session) { this.application = application; this.session = session; this.timeStamp = start; //TODO add copy to suggestion search this.request = new SuggestionRequest(search/*.copy()*/,server.getRawQuery(search, factory)); this.response = new Response(result.size(), queryTime, start.until(end, ChronoUnit.MILLIS), result.getSuggestedFields().size()); }
Example 7
Source File: SuggestionEntry.java From vind with Apache License 2.0 | 5 votes |
public SuggestionEntry(SearchServer server, DocumentFactory factory, Application application, ExecutableSuggestionSearch search, SuggestionResult result, ZonedDateTime start, ZonedDateTime end, long queryTime, long elpasedTime, Session session) { this.application = application; this.session = session; this.timeStamp = start; //TODO add copy to suggestion search this.request = new SuggestionRequest(search/*.copy()*/,server.getRawQuery(search, factory)); this.response = new Response(result.size(), queryTime, start.until(end, ChronoUnit.MILLIS), result.getSuggestedFields().size()); this.response.setElapsedTime(elpasedTime); }
Example 8
Source File: FullTextEntry.java From vind with Apache License 2.0 | 5 votes |
public FullTextEntry(SearchServer server, DocumentFactory factory, Application application, FulltextSearch search, SearchResult result, ZonedDateTime start, ZonedDateTime end, long queryTime, Session session) { this.application = application; this.session = session; this.timeStamp = start; this.request = new FullTextRequest(search.copy(), server.getRawQuery(search,factory)); this.response = new Response(result.getNumOfResults(), queryTime, start.until(end, ChronoUnit.MILLIS)); this.sorting = search.getSorting(); this.paging = new Paging(search.getResultSet()); }
Example 9
Source File: FullTextEntry.java From vind with Apache License 2.0 | 5 votes |
public FullTextEntry(SearchServer server, DocumentFactory factory, Application application, FulltextSearch search, BeanSearchResult result, ZonedDateTime start, ZonedDateTime end, long queryTime, Session session) { this.application = application; this.session = session; this.timeStamp = start; this.request = new FullTextRequest(search.copy(), server.getRawQuery(search,factory)); this.response = new Response(result.getNumOfResults(), queryTime, start.until(end, ChronoUnit.MILLIS)); this.sorting = search.getSorting(); this.paging = new Paging(search.getResultSet()); }
Example 10
Source File: FullTextEntry.java From vind with Apache License 2.0 | 5 votes |
public FullTextEntry(SearchServer server, DocumentFactory factory, Application application, FulltextSearch search, SearchResult result, ZonedDateTime start, ZonedDateTime end, long queryTime, long elapsedTime, Session session) { this.application = application; this.session = session; this.timeStamp = start; this.request = new FullTextRequest(search.copy(), server.getRawQuery(search,factory)); this.response = new Response(result.getNumOfResults(), queryTime, start.until(end, ChronoUnit.MILLIS)); this.response.setElapsedTime(elapsedTime); this.sorting = search.getSorting(); this.paging = new Paging(search.getResultSet()); }
Example 11
Source File: FullTextEntry.java From vind with Apache License 2.0 | 5 votes |
public FullTextEntry(SearchServer server, DocumentFactory factory, Application application, FulltextSearch search, BeanSearchResult result, ZonedDateTime start, ZonedDateTime end, long queryTime, long elapsedTime, Session session) { this.application = application; this.session = session; this.timeStamp = start; this.request = new FullTextRequest(search.copy(), server.getRawQuery(search,factory)); this.response = new Response(result.getNumOfResults(), queryTime, start.until(end, ChronoUnit.MILLIS)); this.response.setElapsedTime(elapsedTime); this.sorting = search.getSorting(); this.paging = new Paging(search.getResultSet()); }
Example 12
Source File: DeleteEntry.java From vind with Apache License 2.0 | 5 votes |
public DeleteEntry(Application application, ZonedDateTime start, ZonedDateTime end, long queryTime, Session session) { this.application = application; this.session = session; this.timeStamp = start; this.response = new Response(-1, queryTime, start.until(end, ChronoUnit.MILLIS )); }
Example 13
Source File: FixedHourSchedule.java From Wisp with Apache License 2.0 | 5 votes |
long durationUntilNextExecutionInMillis(long currentTimeInMillis, Long lastExecutionTimeInMillis) { ZonedDateTime currentDateTime = Instant .ofEpochMilli(currentTimeInMillis) .atZone(zoneId); return currentDateTime .until( nextExecutionDateTime( currentDateTime, lastExecutionTimeInMillis != null && lastExecutionTimeInMillis == currentTimeInMillis ), ChronoUnit.MILLIS ); }