예제 #1
0
파일: PageList.cs 프로젝트: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void evict(long pageRef, org.neo4j.io.pagecache.tracing.EvictionEvent evictionEvent) throws java.io.IOException
        private void Evict(long pageRef, EvictionEvent evictionEvent)
        {
            long filePageId = GetFilePageId(pageRef);

            evictionEvent.FilePageId  = filePageId;
            evictionEvent.CachePageId = pageRef;
            int swapperId = GetSwapperId(pageRef);

            if (swapperId != 0)
            {
                // If the swapper id is non-zero, then the page was not only loaded, but also bound, and possibly modified.
                SwapperSet.SwapperMapping swapperMapping = _swappers.getAllocation(swapperId);
                if (swapperMapping != null)
                {
                    // The allocation can be null if the file has been unmapped, but there are still pages
                    // lingering in the cache that were bound to file page in that file.
                    PageSwapper swapper = swapperMapping.Swapper;
                    evictionEvent.Swapper = swapper;

                    if (IsModified(pageRef))
                    {
                        FlushModifiedPage(pageRef, evictionEvent, filePageId, swapper);
                    }
                    swapper.Evicted(filePageId);
                }
            }
            ClearBinding(pageRef);
        }
예제 #2
0
 public override void Evicted(long filePageId)
 {
     @delegate.Evicted(filePageId);
 }