java.lang.Object
com.orientechnologies.orient.core.cache.OAbstractMapCache<T>
- All Implemented Interfaces:
ORecordCache
- Direct Known Subclasses:
ORecordCacheSoftRefs,ORecordCacheWeakRefs
public abstract class OAbstractMapCache<T extends Map<ORID,?>>
extends Object
implements ORecordCache
- Author:
- Artem Orobets (enisher-at-gmail.com)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Remove all records from cachebooleandisable()Disable cache.booleanenable()Enable cachebooleanTell whether cache is enabledkeys()Keys of all stored in cache recordsvoidshutdown()All operations running at cache destruction stageintsize()Total number of stored recordsvoidstartup()All operations running at cache initialization stageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.cache.ORecordCache
clearRecords, get, put, remove
-
Field Details
-
cache
-
-
Constructor Details
-
OAbstractMapCache
-
-
Method Details
-
startup
public void startup()Description copied from interface:ORecordCacheAll operations running at cache initialization stage- Specified by:
startupin interfaceORecordCache
-
shutdown
public void shutdown()Description copied from interface:ORecordCacheAll operations running at cache destruction stage- Specified by:
shutdownin interfaceORecordCache
-
clear
public void clear()Description copied from interface:ORecordCacheRemove all records from cache- Specified by:
clearin interfaceORecordCache
-
size
public int size()Description copied from interface:ORecordCacheTotal number of stored records- Specified by:
sizein interfaceORecordCache- Returns:
- non-negative number
-
isEnabled
public boolean isEnabled()Description copied from interface:ORecordCacheTell whether cache is enabled- Specified by:
isEnabledin interfaceORecordCache- Returns:
trueif cache enabled at call time, otherwise -false
-
disable
public boolean disable()Description copied from interface:ORecordCacheDisable cache. None of record management methods will cause effect on cache in disabled state. Only cache info methods available at that state.- Specified by:
disablein interfaceORecordCache- Returns:
true- if disabled,false- otherwise (already disabled)
-
enable
public boolean enable()Description copied from interface:ORecordCacheEnable cache- Specified by:
enablein interfaceORecordCache- Returns:
true- if enabled,false- otherwise (already enabled)
-
keys
Description copied from interface:ORecordCacheKeys of all stored in cache records- Specified by:
keysin interfaceORecordCache- Returns:
- keys of records
-