本文整理匯總了Java中com.espertech.esper.epl.view.OutputProcessViewTerminable.terminated方法的典型用法代碼示例。如果您正苦於以下問題:Java OutputProcessViewTerminable.terminated方法的具體用法?Java OutputProcessViewTerminable.terminated怎麽用?Java OutputProcessViewTerminable.terminated使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.espertech.esper.epl.view.OutputProcessViewTerminable
的用法示例。
在下文中一共展示了OutputProcessViewTerminable.terminated方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: stop
import com.espertech.esper.epl.view.OutputProcessViewTerminable; //導入方法依賴的package包/類
public static void stop(StopCallback stopCallback, AgentInstanceContext agentInstanceContext, Viewable finalView, EPServicesContext servicesContext, boolean isStatementStop) {
// obtain statement lock
StatementAgentInstanceLock lock = agentInstanceContext.getEpStatementAgentInstanceHandle().getStatementAgentInstanceLock();
lock.acquireWriteLock(null);
try {
if (finalView instanceof OutputProcessViewTerminable && !isStatementStop) {
OutputProcessViewTerminable terminable = (OutputProcessViewTerminable) finalView;
terminable.terminated();
}
stopSafe(stopCallback, agentInstanceContext.getStatementContext());
if (servicesContext.getSchedulableAgentInstanceDirectory() != null) {
servicesContext.getSchedulableAgentInstanceDirectory().remove(agentInstanceContext.getStatementContext().getStatementId(), agentInstanceContext.getAgentInstanceId());
}
// indicate method resolution
agentInstanceContext.getStatementContext().getMethodResolutionService().destroyedAgentInstance(agentInstanceContext.getAgentInstanceId());
// release resource
agentInstanceContext.getStatementContext().getStatementAgentInstanceRegistry().deassign(agentInstanceContext.getAgentInstanceId());
// cause any remaining schedules, that may concide with the caller's schedule, to be ignored
agentInstanceContext.getEpStatementAgentInstanceHandle().setDestroyed(true);
// cause any filters, that may concide with the caller's filters, to be ignored
agentInstanceContext.getEpStatementAgentInstanceHandle().getStatementFilterVersion().setStmtFilterVersion(Long.MAX_VALUE);
if (agentInstanceContext.getStatementContext().getExtensionServicesContext() != null) {
agentInstanceContext.getStatementContext().getExtensionServicesContext().endContextPartition(agentInstanceContext.getAgentInstanceId());
}
}
finally {
lock.releaseWriteLock(null);
}
}
示例2: stop
import com.espertech.esper.epl.view.OutputProcessViewTerminable; //導入方法依賴的package包/類
public static void stop(StopCallback stopCallback, AgentInstanceContext agentInstanceContext, Viewable finalView, EPServicesContext servicesContext, boolean isStatementStop, boolean leaveLocksAcquired, boolean removedStatementResources) {
if (InstrumentationHelper.ENABLED) {
InstrumentationHelper.get().qContextPartitionDestroy(agentInstanceContext);
}
// obtain statement lock
StatementAgentInstanceLock lock = agentInstanceContext.getEpStatementAgentInstanceHandle().getStatementAgentInstanceLock();
lock.acquireWriteLock();
try {
if (finalView instanceof OutputProcessViewTerminable && !isStatementStop) {
OutputProcessViewTerminable terminable = (OutputProcessViewTerminable) finalView;
terminable.terminated();
}
stopSafe(stopCallback, agentInstanceContext.getStatementContext());
// release resource
agentInstanceContext.getStatementContext().getStatementAgentInstanceRegistry().deassign(agentInstanceContext.getAgentInstanceId());
// cause any remaining schedules, that may concide with the caller's schedule, to be ignored
agentInstanceContext.getEpStatementAgentInstanceHandle().setDestroyed(true);
// cause any filters, that may concide with the caller's filters, to be ignored
agentInstanceContext.getEpStatementAgentInstanceHandle().getStatementFilterVersion().setStmtFilterVersion(Long.MAX_VALUE);
if (removedStatementResources &&
agentInstanceContext.getStatementContext().getStatementExtensionServicesContext() != null &&
agentInstanceContext.getStatementContext().getStatementExtensionServicesContext().getStmtResources() != null) {
agentInstanceContext.getStatementContext().getStatementExtensionServicesContext().getStmtResources().deallocatePartitioned(agentInstanceContext.getAgentInstanceId());
}
} finally {
if (!leaveLocksAcquired) {
if (agentInstanceContext.getStatementContext().getEpStatementHandle().isHasTableAccess()) {
agentInstanceContext.getTableExprEvaluatorContext().releaseAcquiredLocks();
}
lock.releaseWriteLock();
}
if (InstrumentationHelper.ENABLED) {
InstrumentationHelper.get().aContextPartitionDestroy();
}
}
}