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 class
LazyWriteBuffer.RPolicy
-
Constructor Summary
Constructors Constructor Description LazyWriteBuffer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
cleanup()
static void
deleteBlock(String fname)
static void
forceEviction()
Evicts all buffer pool entries.static long
getCacheBlockSize(CacheBlock cb)
static int
getQueueSize()
static ExecutorService
getUtilThreadPool()
static long
getWriteBufferFree()
static long
getWriteBufferLimit()
static long
getWriteBufferSize()
static void
init()
static void
printStatus(String position)
Print current status of buffer pool, including all entries.static CacheBlock
readBlock(String fname, boolean matrix)
static void
setWriteBufferLimit(long limit)
static int
writeBlock(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 IOException
Evicts all buffer pool entries. NOTE: use only for debugging or testing.- Throws:
IOException
- if IOException occurs
-
getUtilThreadPool
public static ExecutorService getUtilThreadPool()
-
-