Class ORecordCacheSoftRefs
java.lang.Object
com.orientechnologies.orient.core.cache.OAbstractMapCache<OSoftRefsHashMap<ORID,ORecord>>
com.orientechnologies.orient.core.cache.ORecordCacheSoftRefs
- All Implemented Interfaces:
ORecordCache
public class ORecordCacheSoftRefs
extends OAbstractMapCache<OSoftRefsHashMap<ORID,ORecord>>
implements ORecordCache
Cache implementation that uses Soft References.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com) (l.garulli-at-orientdb.com)
-
Field Summary
Fields inherited from class com.orientechnologies.orient.core.cache.OAbstractMapCache
cache -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.orientechnologies.orient.core.cache.OAbstractMapCache
disable, enable, isEnabled, keys, size, startup
-
Constructor Details
-
ORecordCacheSoftRefs
public ORecordCacheSoftRefs()
-
-
Method Details
-
get
Description copied from interface:ORecordCacheLook up for record in cache by it's identifier- Specified by:
getin interfaceORecordCache- Parameters:
rid- unique identifier of record- Returns:
- record stored in cache if any, otherwise -
null
-
put
Description copied from interface:ORecordCachePush record to cache. Identifier of record used as access key- Specified by:
putin interfaceORecordCache- Parameters:
record- record that should be cached- Returns:
- previous version of record
-
remove
Description copied from interface:ORecordCacheRemove record with specified identifier- Specified by:
removein interfaceORecordCache- Parameters:
rid- unique identifier of record- Returns:
- record stored in cache if any, otherwise -
null
-
shutdown
public void shutdown()Description copied from interface:ORecordCacheAll operations running at cache destruction stage- Specified by:
shutdownin interfaceORecordCache- Overrides:
shutdownin classOAbstractMapCache<OSoftRefsHashMap<ORID,ORecord>>
-
clear
public void clear()Description copied from interface:ORecordCacheRemove all records from cache- Specified by:
clearin interfaceORecordCache- Overrides:
clearin classOAbstractMapCache<OSoftRefsHashMap<ORID,ORecord>>
-
clearRecords
public void clearRecords()- Specified by:
clearRecordsin interfaceORecordCache
-