Package xyz.cofe.cbuffer.page
Class CachePagedState.NonThreadSafe
- java.lang.Object
-
- xyz.cofe.cbuffer.page.CachePagedState.NonThreadSafe
-
- All Implemented Interfaces:
CachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
- Enclosing interface:
- CachePagedState<M extends UsedPagesInfo,D extends DirtyPagedDataBase<M,? extends DirtyPagedState>>
public static class CachePagedState.NonThreadSafe extends Object implements CachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface xyz.cofe.cbuffer.page.CachePagedState
CachePagedState.NonThreadSafe
-
-
Constructor Summary
Constructors Constructor Description NonThreadSafe()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Rcache2prst_read(Function<IntArrayReadOnly,R> code)Отображение кеша страниц на основную память.voidcache2prst_replace(Function<IntArrayReadOnly,int[]> code)voidcache2prst_write(Consumer<IntArrayMutable> code)DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>cachePages()Кеш страниц (быстрая)voidcachePages(DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe> pages)voidclose()booleanisClosed()ResizablePagespersistentPages()Основная|Постоянная память (медленная)voidpersistentPages(ResizablePages pages)Map<Integer,Integer>prst2cache()отображение страниц основной памяти на кешvoidprst2cache(Map<Integer,Integer> map)xyz.cofe.fn.Tuple2<Long,Long>statCacheHitMiss()voidstatCacheHitMiss(boolean hit)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface xyz.cofe.cbuffer.page.CachePagedState
prst2cache_read, prst2cache_write
-
-
-
-
Method Detail
-
statCacheHitMiss
public void statCacheHitMiss(boolean hit)
- Specified by:
statCacheHitMissin interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
statCacheHitMiss
public xyz.cofe.fn.Tuple2<Long,Long> statCacheHitMiss()
- Specified by:
statCacheHitMissin interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
cachePages
public DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe> cachePages()
Description copied from interface:CachePagedStateКеш страниц (быстрая)- Specified by:
cachePagesin interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
cachePages
public void cachePages(DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe> pages)
- Specified by:
cachePagesin interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
persistentPages
public ResizablePages persistentPages()
Description copied from interface:CachePagedStateОсновная|Постоянная память (медленная)- Specified by:
persistentPagesin interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
persistentPages
public void persistentPages(ResizablePages pages)
- Specified by:
persistentPagesin interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
cache2prst_read
public <R> R cache2prst_read(Function<IntArrayReadOnly,R> code)
Description copied from interface:CachePagedStateОтображение кеша страниц на основную память.Семантика:
cache2prst[ cache_page_index ] = hard_pages_indexЗначение (hard_pages_index):
- -1 или меньше - нет отображения
-
0 или больше - отображение есть
страница может быть чистой или грязной:
DirtyPagedDataBase.dirty(int)- где аргумент hard_pages_index
- Specified by:
cache2prst_readin interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
cache2prst_write
public void cache2prst_write(Consumer<IntArrayMutable> code)
- Specified by:
cache2prst_writein interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
cache2prst_replace
public void cache2prst_replace(Function<IntArrayReadOnly,int[]> code)
- Specified by:
cache2prst_replacein interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
prst2cache
public Map<Integer,Integer> prst2cache()
Description copied from interface:CachePagedStateотображение страниц основной памяти на кеш- Specified by:
prst2cachein interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
prst2cache
public void prst2cache(Map<Integer,Integer> map)
- Specified by:
prst2cachein interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
close
public void close()
- Specified by:
closein interfaceCachePagedState<UsedPagesInfo,DirtyPagedDataBase<UsedPagesInfo,DirtyPagedState.NonThreadSafe>>
-
-