#405 - ENH: Add @ReadAudit and associated functionality for auditing reads including queries and L2 cache access

This commit is contained in:
Robin Bygrave
2015-09-03 13:54:52 +12:00
parent c292da736b
commit 54172aec6c
54 changed files with 2020 additions and 200 deletions
@@ -10,6 +10,7 @@ import com.avaje.ebean.bean.CallStack;
import com.avaje.ebean.bean.ObjectGraphNode;
import com.avaje.ebean.bean.PersistenceContext;
import com.avaje.ebean.event.BeanQueryRequest;
import com.avaje.ebean.event.readaudit.ReadEvent;
import com.avaje.ebeaninternal.server.autofetch.AutoFetchManager;
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor;
import com.avaje.ebeaninternal.server.deploy.BeanPropertyAssocMany;
@@ -644,8 +645,13 @@ public interface SpiQuery<T> extends Query<T> {
int getBufferFetchSizeHint();
/**
* Return true if this is a query executing in the background.
* Return true if read auditing is disabled on this query.
*/
boolean isDisableReadAudit();
/**
* Return true if this is a query executing in the background.
*/
boolean isFutureFetch();
/**
@@ -654,6 +660,16 @@ public interface SpiQuery<T> extends Query<T> {
*/
void setFutureFetch(boolean futureFetch);
/**
* Set the readEvent for future queries (as prepared in foreground thread).
*/
void setFutureFetchAudit(ReadEvent event);
/**
* Read the readEvent for future queries (null otherwise).
*/
ReadEvent getFutureFetchAudit();
/**
* Set the underlying cancelable query (with the PreparedStatement).
*/