Package com.tangosol.net.management
Class MBeanAccessor.QueryBuilder
- java.lang.Object
-
- com.tangosol.net.management.MBeanAccessor.QueryBuilder
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- MBeanAccessor
public static class MBeanAccessor.QueryBuilder extends Object implements Serializable
The Query Builder for generating Coherence MBean queries.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MBeanAccessor.QueryBuilder.ParsedQuery
A ParsedQuery represents the result of a call tobuild()
.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_fExact
Whether to construct a query without a wildcard suffix (exact) or with.protected Map<String,Filter<String>>
m_mapFilters
A map of ObjectName key to Filter.protected String
m_sBaseQuery
The base MBean query to be used in the query.protected String
m_sCluster
The cluster name to be used in the query.protected String
m_sMBeanDomainName
The MBean domain name to be used in the query.protected String
m_sMemberKey
The member key to be used in the query.protected String
m_sService
The service name to be used in the query.
-
Constructor Summary
Constructors Constructor Description QueryBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MBeanAccessor.QueryBuilder.ParsedQuery
build()
Build and return the MBean query.protected Map<String,Filter<String>>
ensureMapFilters()
Ensure a Map is created to storeFilter
s to apply against values of the key/value pairs within the ObjectName.MBeanAccessor.QueryBuilder
exact()
Ensure the generated query does not include a wild card (exact).MBeanAccessor.QueryBuilder
exact(boolean fExact)
Ensure the generated query does not include a wild card (exact).String
getCluster()
The Coherence cluster name to be used for the query.String
getMBeanDomain()
The MBean Domain to be used for the query.String
toString()
MBeanAccessor.QueryBuilder
withBaseQuery(String sBaseQuery)
Set the base MBean query.MBeanAccessor.QueryBuilder
withCluster(String sCluster)
Set the cluster name to be used in the query.MBeanAccessor.QueryBuilder
withFilter(String sKey, Filter<String> predicate)
MBeanAccessor.QueryBuilder
withMBeanDomainName(String sMBeanDomainName)
Set the MBean domain name to be used on the query.MBeanAccessor.QueryBuilder
withMember(String sMemberKey)
Set the member key to be used in the query.MBeanAccessor.QueryBuilder
withService(String sService)
Set the service name to be used in the query.
-
-
-
Field Detail
-
m_sMemberKey
protected String m_sMemberKey
The member key to be used in the query.
-
m_sService
protected String m_sService
The service name to be used in the query.
-
m_sCluster
protected String m_sCluster
The cluster name to be used in the query.
-
m_fExact
protected boolean m_fExact
Whether to construct a query without a wildcard suffix (exact) or with.
-
m_sMBeanDomainName
protected String m_sMBeanDomainName
The MBean domain name to be used in the query.
-
m_sBaseQuery
protected String m_sBaseQuery
The base MBean query to be used in the query.
-
-
Method Detail
-
withBaseQuery
public MBeanAccessor.QueryBuilder withBaseQuery(String sBaseQuery)
Set the base MBean query.- Parameters:
sBaseQuery
- the base query- Returns:
- this
MBeanAccessor.QueryBuilder
instance
-
withCluster
public MBeanAccessor.QueryBuilder withCluster(String sCluster)
Set the cluster name to be used in the query.- Parameters:
sCluster
- the cluster name- Returns:
- this
MBeanAccessor.QueryBuilder
instance
-
withService
public MBeanAccessor.QueryBuilder withService(String sService)
Set the service name to be used in the query.- Parameters:
sService
- the service name- Returns:
- this
MBeanAccessor.QueryBuilder
instance
-
withMember
public MBeanAccessor.QueryBuilder withMember(String sMemberKey)
Set the member key to be used in the query.- Parameters:
sMemberKey
- the member key- Returns:
- this
MBeanAccessor.QueryBuilder
instance
-
withMBeanDomainName
public MBeanAccessor.QueryBuilder withMBeanDomainName(String sMBeanDomainName)
Set the MBean domain name to be used on the query.- Parameters:
sMBeanDomainName
- the MBean domain name- Returns:
- this
MBeanAccessor.QueryBuilder
instance
-
withFilter
public MBeanAccessor.QueryBuilder withFilter(String sKey, Filter<String> predicate)
- Parameters:
sKey
- the key to apply the predicate againstpredicate
- the predicate to test the value against- Returns:
- this
MBeanAccessor.QueryBuilder
instance
-
exact
public MBeanAccessor.QueryBuilder exact()
Ensure the generated query does not include a wild card (exact).- Returns:
- this
MBeanAccessor.QueryBuilder
instance
-
exact
public MBeanAccessor.QueryBuilder exact(boolean fExact)
Ensure the generated query does not include a wild card (exact).- Parameters:
fExact
- whether the generated query should include a wild card- Returns:
- this
MBeanAccessor.QueryBuilder
instance
-
build
public MBeanAccessor.QueryBuilder.ParsedQuery build()
Build and return the MBean query.- Returns:
- the complete MBean query
-
getCluster
public String getCluster()
The Coherence cluster name to be used for the query.- Returns:
- the Coherence clutser name
-
getMBeanDomain
public String getMBeanDomain()
The MBean Domain to be used for the query.- Returns:
- the MBean domain name
-
-