public class IgfsPerBlockLruEvictionPolicy extends Object implements EvictionPolicy<org.apache.ignite.internal.processors.igfs.IgfsBlockKey,byte[]>, IgfsPerBlockLruEvictionPolicyMXBean, Externalizable
| Constructor and Description |
|---|
IgfsPerBlockLruEvictionPolicy()
Default constructor.
|
IgfsPerBlockLruEvictionPolicy(long maxSize,
int maxBlocks)
Constructor.
|
IgfsPerBlockLruEvictionPolicy(long maxSize,
int maxBlocks,
Collection<String> excludePaths)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
exclude(IgfsPath path)
Check whether provided path must be excluded from evictions.
|
int |
getCurrentBlocks()
Gets current amount of blocks.
|
long |
getCurrentSize()
Gets current size of data in all blocks.
|
Collection<String> |
getExcludePaths()
Gets collection of regex for paths whose blocks must not be evicted.
|
int |
getMaxBlocks()
Gets maximum allowed amount of blocks.
|
long |
getMaxSize()
Gets maximum allowed size of all blocks in bytes.
|
void |
onEntryAccessed(boolean rmv,
EvictableEntry<org.apache.ignite.internal.processors.igfs.IgfsBlockKey,byte[]> entry)
Callback for whenever entry is accessed.
|
void |
readExternal(ObjectInput in) |
void |
setExcludePaths(Collection<String> excludePaths)
Sets collection of regex for paths whose blocks must not be evicted.
|
void |
setMaxBlocks(int maxBlocks)
Sets maximum allowed amount of blocks.
|
void |
setMaxSize(long maxSize)
Sets maximum allowed size of data in all blocks in bytes.
|
void |
writeExternal(ObjectOutput out) |
public IgfsPerBlockLruEvictionPolicy()
public IgfsPerBlockLruEvictionPolicy(long maxSize,
int maxBlocks)
maxSize - Maximum size. When reached, eviction begins.maxBlocks - Maximum amount of blocks. When reached, eviction begins.public IgfsPerBlockLruEvictionPolicy(long maxSize,
int maxBlocks,
@Nullable
Collection<String> excludePaths)
maxSize - Maximum size. When reached, eviction begins.maxBlocks - Maximum amount of blocks. When reached, eviction begins.excludePaths - Collection of regex for path which must not be evicted.public void onEntryAccessed(boolean rmv,
EvictableEntry<org.apache.ignite.internal.processors.igfs.IgfsBlockKey,byte[]> entry)
onEntryAccessed in interface EvictionPolicy<org.apache.ignite.internal.processors.igfs.IgfsBlockKey,byte[]>rmv - True if entry has been removed, false otherwise.entry - Accessed entry.public long getMaxSize()
getMaxSize in interface IgfsPerBlockLruEvictionPolicyMXBeanpublic void setMaxSize(long maxSize)
setMaxSize in interface IgfsPerBlockLruEvictionPolicyMXBeanmaxSize - Maximum allowed size of data in all blocks in bytes.public int getMaxBlocks()
getMaxBlocks in interface IgfsPerBlockLruEvictionPolicyMXBeanpublic void setMaxBlocks(int maxBlocks)
setMaxBlocks in interface IgfsPerBlockLruEvictionPolicyMXBeanmaxBlocks - Maximum allowed amount of blocks.public Collection<String> getExcludePaths()
getExcludePaths in interface IgfsPerBlockLruEvictionPolicyMXBeanpublic void setExcludePaths(@Nullable
Collection<String> excludePaths)
setExcludePaths in interface IgfsPerBlockLruEvictionPolicyMXBeanexcludePaths - Collection of regex for paths whose blocks must not be evicted.public long getCurrentSize()
getCurrentSize in interface IgfsPerBlockLruEvictionPolicyMXBeanpublic int getCurrentBlocks()
getCurrentBlocks in interface IgfsPerBlockLruEvictionPolicyMXBeanpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic boolean exclude(IgfsPath path) throws IgniteCheckedException
path - Path.True in case non block of related file must be excluded.IgniteCheckedException - In case of faulty patterns.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016