forked from eclipse/org.eclipse.sensinact.gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow History requests to use zoned times
- Loading branch information
1 parent
a12b3a7
commit 879184b
Showing
16 changed files
with
242 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...clipse/sensinact/gateway/agent/storage/influxdb/read/AbstractInfluxDBTemporalRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright (c) 2021 Kentyou. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Kentyou - initial API and implementation | ||
*/ | ||
package org.eclipse.sensinact.gateway.agent.storage.influxdb.read; | ||
|
||
import java.time.ZonedDateTime; | ||
|
||
import org.eclipse.sensinact.gateway.tools.connector.influxdb.InfluxDbConnector; | ||
|
||
|
||
public abstract class AbstractInfluxDBTemporalRequest<T> extends InfluxDBRequest<T> { | ||
|
||
protected String function; | ||
protected long temporalWindow; | ||
protected ZonedDateTime start; | ||
protected ZonedDateTime end; | ||
|
||
public AbstractInfluxDBTemporalRequest(InfluxDbConnector influxDbConnector) { | ||
super(influxDbConnector); | ||
} | ||
|
||
public void setHistoricStartTime(ZonedDateTime fromTime) { | ||
this.start = fromTime; | ||
} | ||
|
||
public void setHistoricEndTime(ZonedDateTime toTime) { | ||
this.end = toTime; | ||
} | ||
|
||
public void setFunction(String function) { | ||
this.function = function; | ||
} | ||
|
||
public void setTemporalWindow(long temporalWindow) { | ||
this.temporalWindow = temporalWindow; | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...g/eclipse/sensinact/gateway/agent/storage/influxdb/read/AbstractInfluxDBValueRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2021 Kentyou. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Kentyou - initial API and implementation | ||
*/ | ||
package org.eclipse.sensinact.gateway.agent.storage.influxdb.read; | ||
|
||
import java.time.ZonedDateTime; | ||
|
||
import org.eclipse.sensinact.gateway.tools.connector.influxdb.InfluxDbConnector; | ||
|
||
|
||
public abstract class AbstractInfluxDBValueRequest<T> extends InfluxDBRequest<T> { | ||
|
||
protected ZonedDateTime time; | ||
|
||
public AbstractInfluxDBValueRequest(InfluxDbConnector influxDbConnector) { | ||
super(influxDbConnector); | ||
} | ||
|
||
public void setHistoricTime(ZonedDateTime time) { | ||
this.time = time; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
.../java/org/eclipse/sensinact/gateway/agent/storage/influxdb/read/InfluxDBValueRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2021 Kentyou. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Kentyou - initial API and implementation | ||
*/ | ||
package org.eclipse.sensinact.gateway.agent.storage.influxdb.read; | ||
|
||
import org.eclipse.sensinact.gateway.historic.storage.reader.api.HistoricValueRequest; | ||
import org.eclipse.sensinact.gateway.historic.storage.reader.api.TemporalDTO; | ||
import org.eclipse.sensinact.gateway.tools.connector.influxdb.InfluxDbConnector; | ||
|
||
|
||
public class InfluxDBValueRequest extends AbstractInfluxDBValueRequest<TemporalDTO> implements HistoricValueRequest{ | ||
|
||
protected String region; | ||
|
||
public InfluxDBValueRequest(InfluxDbConnector influxDbConnector) { | ||
super(influxDbConnector); | ||
} | ||
|
||
@Override | ||
public TemporalDTO execute() { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.