From 0d8938420554c17938e4a660d01734d6f2fa2af0 Mon Sep 17 00:00:00 2001 From: Seth Ladygo Date: Tue, 30 Oct 2018 18:03:08 -0700 Subject: [PATCH] DurationWindow: rename agentContext for consistency --- src/main/java/ats/plugin/DurationWindow.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/ats/plugin/DurationWindow.java b/src/main/java/ats/plugin/DurationWindow.java index b399929..523b241 100644 --- a/src/main/java/ats/plugin/DurationWindow.java +++ b/src/main/java/ats/plugin/DurationWindow.java @@ -28,7 +28,7 @@ class DurationWindow { .appendMinutes().appendSuffix("m") .appendSeconds().appendSuffix("s") .toFormatter(); - private final AgentInstanceViewFactoryChainContext agentContext; + private final AgentInstanceViewFactoryChainContext context; private final long scheduleSlot; private EPStatementHandleCallback handle; private final Duration interval; @@ -46,7 +46,7 @@ class DurationWindow { { this.plugin = plugin; this.calc = calc; - agentContext = context; + this.context = context; scheduleSlot = context.getStatementContext().getScheduleBucket().allocateSlot(); interval = parseInterval(intervalExpression); } @@ -64,7 +64,7 @@ class DurationWindow { */ private Duration parseInterval(ExprNode interval) { ExprEvaluator evaluator = interval.getForge().getExprEvaluator(); - String intervalStr = (String)evaluator.evaluate(null, true, agentContext); + String intervalStr = (String)evaluator.evaluate(null, true, context); return parseInterval(intervalStr); } @@ -145,7 +145,7 @@ class DurationWindow { * Set up a callback to post an event when our time window expires. */ private void scheduleCallback(DateTime endTime) { - SchedulingService sched = agentContext.getStatementContext().getSchedulingService(); + SchedulingService sched = context.getStatementContext().getSchedulingService(); if (handle != null) { // remove old schedule // log.info("Removing old callback"); @@ -165,7 +165,7 @@ class DurationWindow { } }; - handle = new EPStatementHandleCallback(agentContext.getEpStatementAgentInstanceHandle(), callback); + handle = new EPStatementHandleCallback(context.getEpStatementAgentInstanceHandle(), callback); sched.add(callbackTime, handle, scheduleSlot); // log.info("Scheduled callback for {}", callbackTime); }