Package io.ebeaninternal.server.core
Class DefaultMetaInfoManager
- java.lang.Object
-
- io.ebeaninternal.server.core.DefaultMetaInfoManager
-
- All Implemented Interfaces:
MetaInfoManager
public class DefaultMetaInfoManager extends Object implements MetaInfoManager
DefaultServer based implementation of MetaInfoManager.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerMetrics
collectMetrics()
Return the metrics for the database instance.List<MetricData>
collectMetricsAsData()
Return the metrics as a list of MetricData.ServerMetricsAsJson
collectMetricsAsJson()
Collect the metrics in raw JSON form.List<MetaQueryPlan>
queryPlanCollectNow(QueryPlanRequest request)
Collect query plans in the foreground.List<MetaQueryPlan>
queryPlanInit(QueryPlanInit initRequest)
Initiate query plan collection by turning on "bind capture" on matching query plans.void
resetAllMetrics()
Just reset all the metrics.BasicMetricVisitor
visitBasic()
Run a visit collecting all the metrics and returning BasicMetricVisitor which holds all the metrics in simple lists.void
visitMetrics(MetricVisitor visitor)
Visit the metrics resetting and collecting/reporting as desired.
-
-
-
Method Detail
-
queryPlanInit
public List<MetaQueryPlan> queryPlanInit(QueryPlanInit initRequest)
Description copied from interface:MetaInfoManager
Initiate query plan collection by turning on "bind capture" on matching query plans.Also refer to ServerConfig collectQueryPlans that needs to be set to true and collectQueryPlanThresholdMicros which is a global defaults that can also initiate query plan capture.
- Specified by:
queryPlanInit
in interfaceMetaInfoManager
- Returns:
- The query plans that have had bind capture turned on by this request.
-
queryPlanCollectNow
public List<MetaQueryPlan> queryPlanCollectNow(QueryPlanRequest request)
Description copied from interface:MetaInfoManager
Collect query plans in the foreground.- Specified by:
queryPlanCollectNow
in interfaceMetaInfoManager
-
visitMetrics
public void visitMetrics(MetricVisitor visitor)
Description copied from interface:MetaInfoManager
Visit the metrics resetting and collecting/reporting as desired.- Specified by:
visitMetrics
in interfaceMetaInfoManager
-
collectMetrics
public ServerMetrics collectMetrics()
Description copied from interface:MetaInfoManager
Return the metrics for the database instance.This will reset the metrics (reset counters back to zero etc) and will only return the non-empty metrics.
- Specified by:
collectMetrics
in interfaceMetaInfoManager
-
collectMetricsAsJson
public ServerMetricsAsJson collectMetricsAsJson()
Description copied from interface:MetaInfoManager
Collect the metrics in raw JSON form.String metricsJson = database.getMetaInfoManager() .collectMetricsAsJson() .json();
- Specified by:
collectMetricsAsJson
in interfaceMetaInfoManager
-
collectMetricsAsData
public List<MetricData> collectMetricsAsData()
Description copied from interface:MetaInfoManager
Return the metrics as a list of MetricData.- Specified by:
collectMetricsAsData
in interfaceMetaInfoManager
-
visitBasic
public BasicMetricVisitor visitBasic()
Description copied from interface:MetaInfoManager
Run a visit collecting all the metrics and returning BasicMetricVisitor which holds all the metrics in simple lists.- Specified by:
visitBasic
in interfaceMetaInfoManager
-
resetAllMetrics
public void resetAllMetrics()
Description copied from interface:MetaInfoManager
Just reset all the metrics. Maybe only useful for testing purposes.- Specified by:
resetAllMetrics
in interfaceMetaInfoManager
-
-