Class LazyWriteBuffer
- java.lang.Object
 - 
- org.apache.sysds.runtime.controlprogram.caching.LazyWriteBuffer
 
 
- 
public class LazyWriteBuffer extends Object
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLazyWriteBuffer.RPolicy 
- 
Constructor Summary
Constructors Constructor Description LazyWriteBuffer() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcleanup()static voiddeleteBlock(String fname)static voidforceEviction()Evicts all buffer pool entries.static longgetCacheBlockSize(CacheBlock<?> cb)static intgetQueueSize()static ExecutorServicegetUtilThreadPool()static longgetWriteBufferFree()static longgetWriteBufferLimit()static longgetWriteBufferSize()static voidinit()static voidprintStatus(String position)Print current status of buffer pool, including all entries.static CacheBlock<?>readBlock(String fname, boolean matrix)static voidsetWriteBufferLimit(long limit)static intwriteBlock(String fname, CacheBlock<?> cb) 
 - 
 
- 
- 
Method Detail
- 
writeBlock
public static int writeBlock(String fname, CacheBlock<?> cb) throws IOException
- Throws:
 IOException
 
- 
deleteBlock
public static void deleteBlock(String fname)
 
- 
readBlock
public static CacheBlock<?> readBlock(String fname, boolean matrix) throws IOException
- Throws:
 IOException
 
- 
init
public static void init()
 
- 
cleanup
public static void cleanup()
 
- 
getWriteBufferLimit
public static long getWriteBufferLimit()
 
- 
setWriteBufferLimit
public static void setWriteBufferLimit(long limit)
 
- 
getWriteBufferSize
public static long getWriteBufferSize()
 
- 
getWriteBufferFree
public static long getWriteBufferFree()
 
- 
getQueueSize
public static int getQueueSize()
 
- 
getCacheBlockSize
public static long getCacheBlockSize(CacheBlock<?> cb)
 
- 
printStatus
public static void printStatus(String position)
Print current status of buffer pool, including all entries. NOTE: use only for debugging or testing.- Parameters:
 position- the position
 
- 
forceEviction
public static void forceEviction() throws IOExceptionEvicts all buffer pool entries. NOTE: use only for debugging or testing.- Throws:
 IOException- if IOException occurs
 
- 
getUtilThreadPool
public static ExecutorService getUtilThreadPool()
 
 - 
 
 -