public final class MetricsNoSqlAdapterWrapper extends Object implements NoSqlAdapter
NoSqlAdapter that enables logging and time counting for each call.| Constructor and Description |
|---|
MetricsNoSqlAdapterWrapper(NoSqlAdapter delegate,
org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkConnection()
Checks whether the connection to the NoSQL database is possible
|
void |
createIndexDefinitions()
Creates index definitions for accessing the NoSQL database.
|
boolean |
deleteRecursive(String path)
Remove data including all path-related children from NoSQL database.
|
NoSqlData |
get(String path)
Get data for a single resource from NoSQL database.
|
Iterator<NoSqlData> |
getChildren(String parentPath)
Get data for all children of a resource from NoSQL database.
|
Iterator<NoSqlData> |
query(String query,
String language)
Query for data.
|
boolean |
store(NoSqlData data)
Store data with the given path in NoSQL database.
|
boolean |
validPath(String path)
True if the given path is valid and supported by the NoSQL database.
|
public MetricsNoSqlAdapterWrapper(NoSqlAdapter delegate, org.slf4j.Logger logger)
public boolean validPath(String path)
NoSqlAdaptervalidPath in interface NoSqlAdapterpath - Pathpublic NoSqlData get(String path)
NoSqlAdapterget in interface NoSqlAdapterpath - Pathpublic Iterator<NoSqlData> getChildren(String parentPath)
NoSqlAdaptergetChildren in interface NoSqlAdapterparentPath - Parent pathpublic boolean store(NoSqlData data)
NoSqlAdapterstore in interface NoSqlAdapterdata - Data with pathpublic boolean deleteRecursive(String path)
NoSqlAdapterdeleteRecursive in interface NoSqlAdapterpath - Path to removepublic Iterator<NoSqlData> query(String query, String language)
NoSqlAdapterquery in interface NoSqlAdapterquery - Querylanguage - Query languagepublic void checkConnection()
throws org.apache.sling.api.resource.LoginException
NoSqlAdaptercheckConnection in interface NoSqlAdapterorg.apache.sling.api.resource.LoginException - in case of any errorspublic void createIndexDefinitions()
NoSqlAdapterNoSqlAdapter.checkConnection() call succeeds.createIndexDefinitions in interface NoSqlAdapterCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.