Search in sources :

Example 1 with NodeDocumentLocks

use of org.apache.jackrabbit.oak.plugins.document.locks.NodeDocumentLocks in project jackrabbit-oak by apache.

the class CacheChangesTrackerTest method createCache.

private NodeDocumentCache createCache() {
    Cache<CacheValue, NodeDocument> nodeDocumentsCache = new CacheLIRS<CacheValue, NodeDocument>(10);
    Cache<StringValue, NodeDocument> prevDocumentsCache = new CacheLIRS<StringValue, NodeDocument>(10);
    CacheStats nodeDocumentsCacheStats = Mockito.mock(CacheStats.class);
    CacheStats prevDocumentsCacheStats = Mockito.mock(CacheStats.class);
    NodeDocumentLocks locks = new StripedNodeDocumentLocks();
    return new NodeDocumentCache(nodeDocumentsCache, nodeDocumentsCacheStats, prevDocumentsCache, prevDocumentsCacheStats, locks);
}
Also used : NodeDocumentLocks(org.apache.jackrabbit.oak.plugins.document.locks.NodeDocumentLocks) StripedNodeDocumentLocks(org.apache.jackrabbit.oak.plugins.document.locks.StripedNodeDocumentLocks) StripedNodeDocumentLocks(org.apache.jackrabbit.oak.plugins.document.locks.StripedNodeDocumentLocks) CacheValue(org.apache.jackrabbit.oak.cache.CacheValue) CacheStats(org.apache.jackrabbit.oak.cache.CacheStats) NodeDocument(org.apache.jackrabbit.oak.plugins.document.NodeDocument) StringValue(org.apache.jackrabbit.oak.plugins.document.util.StringValue) CacheLIRS(org.apache.jackrabbit.oak.cache.CacheLIRS)

Aggregations

CacheLIRS (org.apache.jackrabbit.oak.cache.CacheLIRS)1 CacheStats (org.apache.jackrabbit.oak.cache.CacheStats)1 CacheValue (org.apache.jackrabbit.oak.cache.CacheValue)1 NodeDocument (org.apache.jackrabbit.oak.plugins.document.NodeDocument)1 NodeDocumentLocks (org.apache.jackrabbit.oak.plugins.document.locks.NodeDocumentLocks)1 StripedNodeDocumentLocks (org.apache.jackrabbit.oak.plugins.document.locks.StripedNodeDocumentLocks)1 StringValue (org.apache.jackrabbit.oak.plugins.document.util.StringValue)1