ice.net
Class CacheManagerSettings

java.lang.Object
  extended byice.net.CacheManagerSettings
All Implemented Interfaces:
Serializable, Settings

public class CacheManagerSettings
extends Object
implements Serializable, Settings

The CacheManagerSettings class specifies settings for a CacheManager.

Since:
1.5.0
Version:
1.6.0
Author:
Jack van Ooststroom
See Also:
Serialized Form

Constructor Summary
CacheManagerSettings()
          Constructs a CacheManagerSettings object.
 
Method Summary
 boolean equals(Object object)
           
 int getCacheExpirationBuffer()
          Gets the cache expiration buffer in seconds of this CacheManagerSettings.
static int getDefaultCacheExpirationBuffer()
          Returns the current int value of the ice.net.cacheExpirationBuffer property.
 void resetToDefault()
          Resets the settings of current instance to the default settings.
 void setAlwaysRevalidate(boolean alwaysRevalidate)
          Sets this CacheManagerSettings' boolean indicating to "always revalidate" to the specified alwaysRevalidate.
 void setCacheExpirationBuffer(int cacheExpirationBuffer)
          Sets the cache expiration buffer in seconds of this CacheManagerSettings to the specified cacheExpirationBuffer.
static void setDefaultAlwaysRevalidate(boolean alwaysRevalidate)
          Sets the default value of the boolean indicating to "always revalidate" to the specified alwaysRevalidate.
static void setDefaultCacheExpirationBuffer(int cacheExpirationBuffer)
          Sets the default value of the cache expiration buffer in seconds to the specified cacheExpirationBuffer.
static void setDefaultPersistPrivateResponses(boolean persistPrivateResponses)
          Sets the default value of the boolean indicating to persist private responses to the specified peristPrivateResponses.
 void setPersistPrivateResponses(boolean persistPrivateResponses)
           
 boolean shouldAlwaysRevalidate()
          Returns whether or not the CacheManager to be created using this CacheManagerSettings should always revalidate.
static boolean shouldDefaultAlwaysRevalidate()
          Returns the current boolean value of the ice.net.alwaysRevalidate property.
static boolean shouldDefaultPersistPrivateResponses()
          Returns the current boolean value of the ice.net.persistPrivateResponses property.
 boolean shouldPersistPrivateResponses()
          Returns whether or not the CacheManager to be created using this CacheManagerSettings persists private responses.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheManagerSettings

public CacheManagerSettings()

Constructs a CacheManagerSettings object.

Since:
1.5.0
Method Detail

equals

public boolean equals(Object object)

getCacheExpirationBuffer

public int getCacheExpirationBuffer()

Gets the cache expiration buffer in seconds of this CacheManagerSettings.

Returns:
the cache expiration buffer in seconds.
Since:
1.6.0
See Also:
setCacheExpirationBuffer(int)

getDefaultCacheExpirationBuffer

public static int getDefaultCacheExpirationBuffer()

Returns the current int value of the ice.net.cacheExpirationBuffer property.

Returns:
the int value of the ice.net.cacheExpirationBuffer property.
Since:
1.6.0
See Also:
setDefaultCacheExpirationBuffer(int)

resetToDefault

public void resetToDefault()
Description copied from interface: Settings

Resets the settings of current instance to the default settings.

Specified by:
resetToDefault in interface Settings

setAlwaysRevalidate

public void setAlwaysRevalidate(boolean alwaysRevalidate)

Sets this CacheManagerSettings' boolean indicating to "always revalidate" to the specified alwaysRevalidate.

When a new CacheManager is created through the CacheManager.CacheManager(CacheManagerSettings) constructor with this CacheManagerSettings as parameter, the CacheManager.shouldAlwaysRevalidate() method's return value of the new CacheManager equals this CacheManagerSettings' shouldAlwaysRevalidate() method return value.

Parameters:
alwaysRevalidate - the new "always revalidate" boolean value.
Since:
1.5.0
See Also:
shouldAlwaysRevalidate(), CacheManager.CacheManager(CacheManagerSettings), CacheManager.shouldAlwaysRevalidate()

setCacheExpirationBuffer

public void setCacheExpirationBuffer(int cacheExpirationBuffer)

Sets the cache expiration buffer in seconds of this CacheManagerSettings to the specified cacheExpirationBuffer.

When a new CacheManager is created through the CacheManager.CacheManager(CacheManagerSettings) constructor with this CacheManagerSettings as parameter, the CacheManager.getCacheExpirationBuffer() method's return value of the new CacheManager equals this CacheManagerSettings' getCacheExpirationBuffer() method return value.

Parameters:
cacheExpirationBuffer - the new cache expiration buffer in seconds.
Since:
1.6.0
See Also:
getCacheExpirationBuffer(), CacheManager.CacheManager(CacheManagerSettings), CacheManager.getCacheExpirationBuffer()

setDefaultAlwaysRevalidate

public static void setDefaultAlwaysRevalidate(boolean alwaysRevalidate)

Sets the default value of the boolean indicating to "always revalidate" to the specified alwaysRevalidate.

That is, every new instance of CacheManagerSettings will have the boolean indicating to "always revalidate" set to the specified alwaysRevalidate.

This method sets the ice.net.alwaysRevalidate property for the current runtime.

Parameters:
alwaysRevalidate - the new "always revalidate" boolean value.
Since:
1.5.0
See Also:
shouldDefaultAlwaysRevalidate(), shouldAlwaysRevalidate()

setDefaultCacheExpirationBuffer

public static void setDefaultCacheExpirationBuffer(int cacheExpirationBuffer)

Sets the default value of the cache expiration buffer in seconds to the specified cacheExpirationBuffer.

That is, every new instance of CacheManagerSettings will have the cache expiration buffer set to the specified cacheExpirationBuffer.

This method sets the ice.net.cacheExpirationBuffer property for the current runtime.

Parameters:
cacheExpirationBuffer - the new cache expiration buffer in seconds.
Since:
1.6.0
See Also:
getDefaultCacheExpirationBuffer(), getCacheExpirationBuffer()

setDefaultPersistPrivateResponses

public static void setDefaultPersistPrivateResponses(boolean persistPrivateResponses)

Sets the default value of the boolean indicating to persist private responses to the specified peristPrivateResponses.

That is, every new instance of CacheManagerSettings will have the boolean indicating to persist private responses set to the specified persistPrivateResponses.

This method sets the ice.net.persistPrivateResponses property for the current runtime.

Parameters:
persistPrivateResponses - the new boolean value indicating the persistence of private responses.
Since:
1.6.0
See Also:
shouldDefaultPersistPrivateResponses(), shouldPersistPrivateResponses()

setPersistPrivateResponses

public void setPersistPrivateResponses(boolean persistPrivateResponses)
Parameters:
persistPrivateResponses -
Since:
1.6.0

shouldAlwaysRevalidate

public boolean shouldAlwaysRevalidate()

Returns whether or not the CacheManager to be created using this CacheManagerSettings should always revalidate.

Returns:
true if the CacheManager to be created should always revalidate, false if not.
Since:
1.5.0
See Also:
setAlwaysRevalidate(boolean)

shouldDefaultAlwaysRevalidate

public static boolean shouldDefaultAlwaysRevalidate()

Returns the current boolean value of the ice.net.alwaysRevalidate property.

Returns:
the boolean value of the ice.net.alwaysRevalidate property.
Since:
1.5.0
See Also:
setDefaultAlwaysRevalidate(boolean)

shouldDefaultPersistPrivateResponses

public static boolean shouldDefaultPersistPrivateResponses()

Returns the current boolean value of the ice.net.persistPrivateResponses property.

Returns:
the boolean value of the ice.net.persistPrivateResponses property.
Since:
1.6.0
See Also:
setDefaultPersistPrivateResponses(boolean)

shouldPersistPrivateResponses

public boolean shouldPersistPrivateResponses()

Returns whether or not the CacheManager to be created using this CacheManagerSettings persists private responses.

Returns:
true if the CacheManager to be created persists private responses, false if not.
Since:
1.6.0
See Also:
setPersistPrivateResponses(boolean)

toString

public String toString()