public void reset ( ) { if ( refCount . get ( ) > 0 && isRefCountingEnabled ( ) ) { Tr . warning ( tc , "reset called on " + id + " with a refCount of " + refCount ) ; Thread . dumpStack ( ) ; } cacheName = null ; drsClock = - 1 ; timeStamp = - 1 ; serializedId = null ; id = null ; if ( useByteBuffer && this . value != null ) { if ( this . value instanceof DistributedNioMapObject ) { ( ( DistributedNioMapObject ) this . value ) . release ( ) ; } } serializedValue = null ; value = null ; clock = CacheConfig . DEFAULT_PRIORITY ; refCount . set ( 0 ) ; priority = CacheConfig . DEFAULT_PRIORITY ; timeLimit = - 1 ; inactivity = - 1 ; expirationTime = - 1 ; validatorExpirationTime = - 1 ; removeWhenUnpinned = false ; _templates = EMPTY_STRING_ARRAY ; _dataIds = EMPTY_OBJECT_ARRAY ; _serializedDataIds = null ; pendingRemoval = false ; sharingPolicy = EntryInfo . NOT_SHARED ; persistToDisk = true ; isOverflowEntry = false ; lruEvicted = false ; lruHead = null ; useByteBuffer = false ; aliasList = EMPTY_OBJECT_ARRAY ; serializedAliasList = null ; userMetaData = null ; serializedUserMetaData = null ; loadedFromDisk = false ; cacheType = CACHE_TYPE_DEFAULT ; skipValueSerialized = false ; skipMemoryAndWriteToDisk = false ; skipMemoryAndWriteToDiskErrorCode = HTODDynacache . NO_EXCEPTION ; valueHashcode = 0 ; externalCacheGroupId = null ; }
This brings this CacheEntry back to the same state it had when it was first created . It does not change its lruArray index . It is called by the Cache when one of the preallocated CacheEntry instances is about to be reused for another logical entry .