ACE-4845 added definition retrieval transaction enforcement and denial of unauthenticated virtualization

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@120082 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Bogdan Horje
2015-12-11 15:00:20 +00:00
parent cb76deb4fd
commit 56ffc625c9
5 changed files with 228 additions and 64 deletions

View File

@@ -136,23 +136,23 @@ public class Reference
}
}
// Average reference length DEBUG trace
// Average reference length log trace
private static long _debug_refLength = 0;
private static long _trace_refLength = 0;
private static long _debug_refCount = 0;
private static long _trace_refCount = 0;
private static final long _debug_refBatchSize = 256;
private static final long _trace_refBatchSize = 4096*2;
private static synchronized void debug_avg_ref_length(long refLength)
private static synchronized void _trace_avg_ref_length(long refLength)
{
_debug_refLength += refLength;
_debug_refCount++;
if (_debug_refBatchSize > 0 && _debug_refCount % _debug_refBatchSize == 0)
_trace_refLength += refLength;
_trace_refCount++;
if (_trace_refBatchSize > 0 && _trace_refCount % _trace_refBatchSize == 0)
{
logger.debug("Average reference encoding size : " + (_debug_refLength / _debug_refCount));
_debug_refCount = 0;
_debug_refLength = 0;
logger.trace("Average reference encoding size : " + (_trace_refLength / _trace_refCount));
_trace_refCount = 0;
_trace_refLength = 0;
}
}
@@ -281,9 +281,9 @@ public class Reference
NodeRef theNode = new NodeRef(storeRef,
idBuilder.toString());
if (logger.isDebugEnabled())
if (logger.isTraceEnabled())
{
debug_avg_ref_length(theNode.toString().length());
_trace_avg_ref_length(theNode.toString().length());
}
return theNode;