com.hazelcast.config
Class NearCacheConfig

java.lang.Object
  extended by com.hazelcast.config.NearCacheConfig
All Implemented Interfaces:
DataSerializable, Serializable
Direct Known Subclasses:
NearCacheConfigReadOnly

public class NearCacheConfig
extends Object
implements DataSerializable, Serializable

Contains configuration for an NearCache.

See Also:
Serialized Form

Nested Class Summary
static class NearCacheConfig.LocalUpdatePolicy
          Local Update Policy enum.
 
Field Summary
static String DEFAULT_EVICTION_POLICY
          Default eviction policy
static int DEFAULT_MAX_IDLE_SECONDS
          Default value of idle in seconds for eviction.
static int DEFAULT_MAX_SIZE
          Default value of maximum size
static InMemoryFormat DEFAULT_MEMORY_FORMAT
          Default memory format
static int DEFAULT_TTL_SECONDS
          Default value of time to live in seconds.
 
Constructor Summary
NearCacheConfig()
           
NearCacheConfig(int timeToLiveSeconds, int maxSize, String evictionPolicy, int maxIdleSeconds, boolean invalidateOnChange, InMemoryFormat inMemoryFormat)
           
NearCacheConfig(NearCacheConfig config)
           
NearCacheConfig(String name)
           
 
Method Summary
 NearCacheConfigReadOnly getAsReadOnly()
           
 String getEvictionPolicy()
           
 InMemoryFormat getInMemoryFormat()
           
 NearCacheConfig.LocalUpdatePolicy getLocalUpdatePolicy()
           
 int getMaxIdleSeconds()
           
 int getMaxSize()
           
 String getName()
           
 int getTimeToLiveSeconds()
           
 boolean isCacheLocalEntries()
           
 boolean isInvalidateOnChange()
           
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 NearCacheConfig setCacheLocalEntries(boolean cacheLocalEntries)
           
 NearCacheConfig setEvictionPolicy(String evictionPolicy)
           
 NearCacheConfig setInMemoryFormat(InMemoryFormat inMemoryFormat)
           
 NearCacheConfig setInMemoryFormat(String inMemoryFormat)
           
 NearCacheConfig setInvalidateOnChange(boolean invalidateOnChange)
           
 NearCacheConfig setLocalUpdatePolicy(NearCacheConfig.LocalUpdatePolicy localUpdatePolicy)
           
 NearCacheConfig setMaxIdleSeconds(int maxIdleSeconds)
           
 NearCacheConfig setMaxSize(int maxSize)
           
 NearCacheConfig setName(String name)
           
 NearCacheConfig setTimeToLiveSeconds(int timeToLiveSeconds)
           
 String toString()
           
 void writeData(ObjectDataOutput out)
          Writes object fields to output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_TTL_SECONDS

public static final int DEFAULT_TTL_SECONDS
Default value of time to live in seconds.

See Also:
Constant Field Values

DEFAULT_MAX_IDLE_SECONDS

public static final int DEFAULT_MAX_IDLE_SECONDS
Default value of idle in seconds for eviction.

See Also:
Constant Field Values

DEFAULT_MAX_SIZE

public static final int DEFAULT_MAX_SIZE
Default value of maximum size

See Also:
Constant Field Values

DEFAULT_EVICTION_POLICY

public static final String DEFAULT_EVICTION_POLICY
Default eviction policy

See Also:
Constant Field Values

DEFAULT_MEMORY_FORMAT

public static final InMemoryFormat DEFAULT_MEMORY_FORMAT
Default memory format

Constructor Detail

NearCacheConfig

public NearCacheConfig()

NearCacheConfig

public NearCacheConfig(String name)

NearCacheConfig

public NearCacheConfig(int timeToLiveSeconds,
                       int maxSize,
                       String evictionPolicy,
                       int maxIdleSeconds,
                       boolean invalidateOnChange,
                       InMemoryFormat inMemoryFormat)

NearCacheConfig

public NearCacheConfig(NearCacheConfig config)
Method Detail

getAsReadOnly

public NearCacheConfigReadOnly getAsReadOnly()

getName

public String getName()

setName

public NearCacheConfig setName(String name)

getTimeToLiveSeconds

public int getTimeToLiveSeconds()

setTimeToLiveSeconds

public NearCacheConfig setTimeToLiveSeconds(int timeToLiveSeconds)

getMaxSize

public int getMaxSize()

setMaxSize

public NearCacheConfig setMaxSize(int maxSize)

getEvictionPolicy

public String getEvictionPolicy()

setEvictionPolicy

public NearCacheConfig setEvictionPolicy(String evictionPolicy)

getMaxIdleSeconds

public int getMaxIdleSeconds()

setMaxIdleSeconds

public NearCacheConfig setMaxIdleSeconds(int maxIdleSeconds)

isInvalidateOnChange

public boolean isInvalidateOnChange()

setInvalidateOnChange

public NearCacheConfig setInvalidateOnChange(boolean invalidateOnChange)

getInMemoryFormat

public InMemoryFormat getInMemoryFormat()

setInMemoryFormat

public NearCacheConfig setInMemoryFormat(InMemoryFormat inMemoryFormat)

isCacheLocalEntries

public boolean isCacheLocalEntries()

setCacheLocalEntries

public NearCacheConfig setCacheLocalEntries(boolean cacheLocalEntries)

getLocalUpdatePolicy

public NearCacheConfig.LocalUpdatePolicy getLocalUpdatePolicy()

setLocalUpdatePolicy

public NearCacheConfig setLocalUpdatePolicy(NearCacheConfig.LocalUpdatePolicy localUpdatePolicy)

setInMemoryFormat

public NearCacheConfig setInMemoryFormat(String inMemoryFormat)

writeData

public void writeData(ObjectDataOutput out)
               throws IOException
Description copied from interface: DataSerializable
Writes object fields to output stream

Specified by:
writeData in interface DataSerializable
Parameters:
out - output
Throws:
IOException

readData

public void readData(ObjectDataInput in)
              throws IOException
Description copied from interface: DataSerializable
Reads fields from the input stream

Specified by:
readData in interface DataSerializable
Parameters:
in - input
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.