org.apache.blur.store.blockcache
Class BlockCache
java.lang.Object
org.apache.blur.store.blockcache.BlockCache
- All Implemented Interfaces:
- Closeable
public class BlockCache
- extends Object
- implements Closeable
Field Summary |
static int |
_128M
|
static int |
_8K
|
static boolean |
UNMAP_SUPPORTED
true , if this platform supports unmapping mmapped files. |
Constructor Summary |
BlockCache(boolean directAllocation,
long totalMemory)
|
BlockCache(boolean directAllocation,
long totalMemory,
int slabSize)
|
UNMAP_SUPPORTED
public static final boolean UNMAP_SUPPORTED
true
, if this platform supports unmapping mmapped files.
_128M
public static final int _128M
- See Also:
- Constant Field Values
_8K
public static final int _8K
- See Also:
- Constant Field Values
BlockCache
public BlockCache(boolean directAllocation,
long totalMemory)
BlockCache
public BlockCache(boolean directAllocation,
long totalMemory,
int slabSize)
store
public boolean store(BlockCacheKey blockCacheKey,
int blockOffset,
byte[] data,
int offset,
int length)
fetch
public boolean fetch(BlockCacheKey blockCacheKey,
byte[] buffer,
int blockOffset,
int off,
int length)
fetch
public boolean fetch(BlockCacheKey blockCacheKey,
byte[] buffer)
getSize
public int getSize()
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Throws:
IOException
Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.