public class TotalQueryCostCeilingConstraint extends Object implements QueryLaunchingConstraint
Constructor and Description |
---|
TotalQueryCostCeilingConstraint(com.google.common.base.Optional<QueryCost> totalQueryCostCeilingPerUser) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowsLaunchOf(QueryContext candidateQuery,
EstimatedImmutableQueryCollection launchedQueries)
This constraint allows a query to be launched by the user,
if total query cost of launched queries of
the user is less than or equal to the total query cost ceiling per user
OR
the total query cost ceiling per user is not present.
|
boolean |
equals(Object o) |
int |
hashCode() |
public TotalQueryCostCeilingConstraint(@NonNull com.google.common.base.Optional<QueryCost> totalQueryCostCeilingPerUser)
public boolean allowsLaunchOf(QueryContext candidateQuery, EstimatedImmutableQueryCollection launchedQueries)
allowsLaunchOf
in interface QueryLaunchingConstraint
candidateQuery
- The query which is the next candidate to be launched.launchedQueries
- Current launched queries@Generated(value="lombok") public boolean equals(Object o)
@Generated(value="lombok") public int hashCode()
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.