public interface CacheAccess
RecordAccess is the main access point for AbstractBaseRecord and friends,
so is CacheAccess the main access point for cached values related to records, most often caching
parts of records, specific to certain stages of the consistency check.
The access patterns to CacheAccess is designed to have multiple threads concurrently, and so
client() provides a CacheAccess.Client that accesses the cache on the current thread's behalf.
The cache is a compact representation of records, tied to an id, for example nodeId. There can be multiple
cached values per id, selected by slot.| Modifier and Type | Interface and Description |
|---|---|
static interface |
CacheAccess.Client
Client per thread for accessing cache and counts for statistics
|
| Modifier and Type | Field and Description |
|---|---|
static CacheAccess |
EMPTY |
static CacheAccess.Client |
EMPTY_CLIENT |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
Clears all cached values.
|
CacheAccess.Client |
client() |
boolean |
isForward()
A flag for record checkers using this cache, where cached values are treated differently if
we're scanning through a store forwards or backwards.
|
void |
prepareForProcessingOfSingleStore(long recordsPerCPU) |
void |
setCacheSlotSizes(int... slotSize)
Sets the slot sizes of the cached values.
|
void |
setForward(boolean forward)
Tells this
CacheAccess whether or not the current stage, i.e is scanning forwards or backwards
through a store or not. |
static final CacheAccess.Client EMPTY_CLIENT
static final CacheAccess EMPTY
CacheAccess.Client client()
CacheAccess.Client for the current Thread.boolean isForward()
true if the scanning is currently set to go forward.void setForward(boolean forward)
CacheAccess whether or not the current stage, i.e is scanning forwards or backwards
through a store or not. The cached values are treated differently depending on which. This is due to
the double-linked nature of some stores, specifically the relationship store.forward - true if the current scanning is forwards, otherwise it's backwards.void clearCache()
void setCacheSlotSizes(int... slotSize)
slotSize - defines how many and how big the slots are for cached values that are put after this call.void prepareForProcessingOfSingleStore(long recordsPerCPU)
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.