eXo Kernel :: Component :: Cache Service 2.5.0-GA

org.exoplatform.services.cache
Class ExoCacheConfig

java.lang.Object
  extended by org.exoplatform.services.cache.ExoCacheConfig
All Implemented Interfaces:
Cloneable

public class ExoCacheConfig
extends Object
implements Cloneable

This class defines the main configuration properties of an ExoCache

Since:
Feb 20, 2005
Version:
$Id: ExoCacheConfig.java 5799 2006-05-28 17:55:42Z geaz $
Author:
Tuan Nguyen (tuan08@users.sourceforge.net)

Field Summary
 boolean avoidValueReplication
          Indicates whether or not the replication of the values should be avoided
 
Constructor Summary
ExoCacheConfig()
           
 
Method Summary
 boolean avoidValueReplication()
           
 ExoCacheConfig clone()
           
 String getImplementation()
          Returns the full qualified name of the cache implementation to use.
 String getLabel()
          Returns the cache label
 long getLiveTime()
          Returns the amount of time (in seconds) a cache entry is not written or read before it is evicted
 int getMaxSize()
          Returns the maximum amount of entries allowed in the cache
 String getName()
          Returns the cache name
 boolean isDistributed()
          Indicates if the cache is distributed or not.
 boolean isLogEnabled()
           
 boolean isRepicated()
          Indicates if the cache is replicated or not.
 void setAvoidValueReplication(boolean avoidValueReplication)
           
 void setDistributed(boolean b)
          Sets distributed state
 void setImplementation(String alg)
          Sets the full qualified name of the cache implementation to use.
 void setLabel(String s)
          Sets the cache label
 void setLiveTime(long period)
          Sets the amount of time (in seconds) a cache entry is not written or read before it is evicted
 void setLogEnabled(boolean enableLogging)
           
 void setMaxSize(int size)
          Sets the maximum amount of entries allowed in the cache
 void setName(String s)
          Sets the cache name
 void setReplicated(boolean b)
          Sets replicated state
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

avoidValueReplication

public boolean avoidValueReplication
Indicates whether or not the replication of the values should be avoided

Constructor Detail

ExoCacheConfig

public ExoCacheConfig()
Method Detail

getName

public String getName()
Returns the cache name

Returns:
the cache name

setName

public void setName(String s)
Sets the cache name

Parameters:
s - the cache name

getLabel

public String getLabel()
Returns the cache label

Returns:
the cache label

setLabel

public void setLabel(String s)
Sets the cache label

Parameters:
s - the cache label

getMaxSize

public int getMaxSize()
Returns the maximum amount of entries allowed in the cache

Returns:
the max size of the cache.

setMaxSize

public void setMaxSize(int size)
Sets the maximum amount of entries allowed in the cache

Parameters:
size - the max size of the cache

getLiveTime

public long getLiveTime()
Returns the amount of time (in seconds) a cache entry is not written or read before it is evicted

Returns:
the live time

setLiveTime

public void setLiveTime(long period)
Sets the amount of time (in seconds) a cache entry is not written or read before it is evicted

Parameters:
period - the value of the live time

isDistributed

public boolean isDistributed()
Indicates if the cache is distributed or not.

Returns:
flag that indicates if the cache is distributed or not.

setDistributed

public void setDistributed(boolean b)
Sets distributed state

Parameters:
b - flag that indicates if the cache is distributed or not.

isRepicated

public boolean isRepicated()
Indicates if the cache is replicated or not.

Returns:
flag that indicates if the cache is repicated or not.

setReplicated

public void setReplicated(boolean b)
Sets replicated state

Parameters:
b - flag that indicates if the cache is repicated or not.

getImplementation

public String getImplementation()
Returns the full qualified name of the cache implementation to use.

Returns:
the full qualified name

setImplementation

public void setImplementation(String alg)
Sets the full qualified name of the cache implementation to use.

Parameters:
alg - the full qualified name of the cache implementation

isLogEnabled

public boolean isLogEnabled()

setLogEnabled

public void setLogEnabled(boolean enableLogging)

avoidValueReplication

public boolean avoidValueReplication()
Returns:
the avoidValueReplication

setAvoidValueReplication

public void setAvoidValueReplication(boolean avoidValueReplication)
Parameters:
avoidValueReplication - the avoidValueReplication to set

clone

public ExoCacheConfig clone()
                     throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException
See Also:
Object.clone()

eXo Kernel :: Component :: Cache Service 2.5.0-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.