org.diirt.datasource.timecache.query.Query Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datasource-timecache Show documentation
Show all versions of datasource-timecache Show documentation
Local cache for time series gathered from multiple sources.
The newest version!
/**
* Copyright (C) 2010-14 diirt developers. See COPYRIGHT.TXT
* All rights reserved. Use is subject to license terms. See LICENSE.TXT
*/
package org.diirt.datasource.timecache.query;
import org.diirt.util.time.TimeInterval;
/**
* @author Fred Arnaud (Sopra Group) - ITER
*/
public interface Query {
/**
* Changes the parameters for the query. This method is thread safe and
* returns immediately. It may schedule asynchronous execution of service
* calls to fetch the data.
* @param queryParameters
*/
public void update(QueryParameters queryParameters);
/**
* This method returns all data available for the specified
* {@link TimeInterval}.
*/
public QueryResult getResult();
/**
* This method can be polled at regular interval and should return right
* away with the data is already available, even if incomplete.
*/
public QueryResult getUpdate();
/**
* Query can be disposed. Future calls to getResult() and getUpdate() will
* result in IllegalStateException.
*/
public void close();
}