org.apache.cocoon.monitoring.cache
Class CacheBurstActions

java.lang.Object
  extended by org.apache.cocoon.monitoring.cache.CacheBurstActions

@ManagedResource(objectName="org.apache.cocoon:group=Cache,name=CacheBurstActions",
                 description="This module can perform burst operation (like cleaning specified cache elements) on all cache data.")
public class CacheBurstActions
extends Object

This class can perform burst operation (like cleaning specified cache elements) on all cache data.


Constructor Summary
CacheBurstActions(Map<String,Cache> caches)
           
 
Method Summary
 boolean clear(long minSize, long maxSize, String minLastModifyDate, String maxLastModifiDate, String minExpiresDate, String maxExpiresDate)
          Clears all cache entry's that matches all conditions in parameters.
 boolean clearAllGreaterThen(long minSize)
          Clears all cache entry's that size is greater that minSize parameter.
 boolean clearAllOlderThen(String baseDate)
          Clears all cache entry's that are older than baseDate parameter.
 boolean clearAllSmallerThen(long maxSize)
          Clears all cache entries whose size is smaller than maxSize parameter.
 boolean clearAllYoungerThen(String baseDate)
          Clears all cache entry's that are younger than baseDate parameter.
 String[] list(long minSize, long maxSize, String minLastModifyDate, String maxLastModifiDate, String minExpiresDate, String maxExpiresDate)
          List all cache entry's that that matches all conditions in parameters.
 String[] listAllGreaterThen(long minSize)
          List all cache entry's that size is greater then minSize parameter.
 String[] listAllOlderThen(String baseDate)
          List all cache entry's that older than baseDate parameter.
 String[] listAllSmallerThen(long maxSize)
          List all cache entry's that size is smaller then minSize parameter.
 String[] listAllYoungerThen(String baseDate)
          List all cache entry's that younger than baseDate parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheBurstActions

public CacheBurstActions(Map<String,Cache> caches)
Method Detail

clearAllGreaterThen

@ManagedOperation(description="Clears all cache entry\'s that size is greater that minSize parameter.")
@ManagedOperationParameters(value=)
public final boolean clearAllGreaterThen(long minSize)
Clears all cache entry's that size is greater that minSize parameter.

This operation will stops clearing elements after first failure, this means that it will clear all cache entry's until one of that entry's fails to clear.

Parameters:
minSize - Minimal size (in bytes) of cache entry that should be cleaned.
Returns:
true if operation ends with success, false otherwise

clearAllSmallerThen

@ManagedOperation(description="Clears all cache entry\'s that size is smaller than maxSize parameter.")
@ManagedOperationParameters(value=)
public final boolean clearAllSmallerThen(long maxSize)
Clears all cache entries whose size is smaller than maxSize parameter.

This operation will stops clearing elements after first failure, this means that it will clear all cache entry's until one of that entry's fails to clear.

Parameters:
maxSize - Maximum size (in bytes) of cache entry that should be cleaned.
Returns:
true if operation ends with success, false otherwise

clearAllOlderThen

@ManagedOperation(description="Clears all cache entry\'s that are older than baseDate parameter.")
@ManagedOperationParameters(value=)
public final boolean clearAllOlderThen(String baseDate)
Clears all cache entry's that are older than baseDate parameter.

This operation will stops clearing elements after first failure, this means that it will clear all cache entry's until one of that entry's fails to clear.

Parameters:
baseDate -
Returns:
true if operation ends with success, false otherwise

clearAllYoungerThen

@ManagedOperation(description="Clears all cache entry\'s that are younger than baseDate parameter.")
@ManagedOperationParameters(value=)
public final boolean clearAllYoungerThen(String baseDate)
Clears all cache entry's that are younger than baseDate parameter.

This operation will stops clearing elements after first failure, this means that it will clear all cache entry's until one of that entry's fails to clear.

Parameters:
baseDate -
Returns:
true if operation ends with success, false otherwise

clear

@ManagedOperation(description="Clears all cache entry\'s that matches all conditions in parameters. All parameters are connected logical AND, so to perform action cache entry should match all conditions at once.")
@ManagedOperationParameters(value={,,,,,})
public final boolean clear(long minSize,
                                                                       long maxSize,
                                                                       String minLastModifyDate,
                                                                       String maxLastModifiDate,
                                                                       String minExpiresDate,
                                                                       String maxExpiresDate)
Clears all cache entry's that matches all conditions in parameters. All parameters are connected logical AND, so to perform action cache entry should match all conditions at once.

This operation will stops clearing elements after first failure, this means that it will clear all cache entry's until one of that entry's fails to clear.

Parameters:
minSize - Minimal size (in bytes) of cache entry that should be cleaned. If value of this parameter < 0 then it isn't consider.
maxSize - Maximum size (in bytes) of cache entry that should be cleaned. If value of this parameter < 0 then it isn't consider.
minLasModifyDate - If this parameter is null or is empty it isn't consider.
maxLasModifyDate - If this parameter is null or is empty it isn't consider.
minExpiresDate - This parameter apply's only to ExpiresCacheKey entry's. If this parameter is null or is empty it isn't consider.
maxExpiresDate - This parameter apply's only to ExpiresCacheKey entry's. If this parameter is null or is empty it isn't consider.
Returns:
true if operation ends with success, false otherwise

listAllGreaterThen

@ManagedOperation(description="List all cache entry\'s that size is greater then minSize parameter. You should use this operation just before performing clearAllGreaterThen() to check what entry\'s would be cleaned. Returned list is limited to first 100 entry\'s.")
@ManagedOperationParameters(value=)
public final String[] listAllGreaterThen(long minSize)
List all cache entry's that size is greater then minSize parameter. You should use this operation just before performing clearAllGreaterThen() to check what entry's would be cleaned. Returned list is limited to first 100 entry's.

Parameters:
Minimal - size (in bytes) of cache entry.
Returns:
list of cache entry's that matches query arguments

listAllSmallerThen

@ManagedOperation(description="List all cache entry\'s that size is smaller then minSize parameter. You should use this operation just before performing clearAllSmallerThen() to check what entry\'s would be cleaned. Returned list is limited to first 100 entry\'s.")
@ManagedOperationParameters(value=)
public final String[] listAllSmallerThen(long maxSize)
List all cache entry's that size is smaller then minSize parameter. You should use this operation just before performing clearAllSmallerThen() to check what entry's would be cleaned. Returned list is limited to first 100 entry's.

Parameters:
maxSize - Maximum size (in bytes) of cache entry.
Returns:
list of cache entry's that matches query arguments

listAllOlderThen

@ManagedOperation(description="List all cache entry\'s that older than baseDate parameter. You should use this operation just before performing clearAllOlderThen() to check what entry\'s would be cleaned. Returned list is limited to first 100 entry\'s.")
@ManagedOperationParameters(value=)
public final String[] listAllOlderThen(String baseDate)
List all cache entry's that older than baseDate parameter. You should use this operation just before performing clearAllOlderThen() to check what entry's would be cleaned. Returned list is limited to first 100 entry's.

Parameters:
baseDate -
Returns:
list of cache entry's that matches query arguments

listAllYoungerThen

@ManagedOperation(description="List all cache entry\'s that younger than baseDate parameter. You should use this operation just before performing clearAllYoungerThen() to check what entry\'s would be cleaned. Returned list is limited to first 100 entry\'s.")
@ManagedOperationParameters(value=)
public final String[] listAllYoungerThen(String baseDate)
List all cache entry's that younger than baseDate parameter. You should use this operation just before performing clearAllYoungerThen() to check what entry's would be cleaned. Returned list is limited to first 100 entry's.

Parameters:
baseDate -
Returns:
list of cache entry's that matches query arguments

list

@ManagedOperation(description="List all cache entry\'s that that matches all conditions in parameters. All parameters are connected logical AND, so to perform action cache entry should match all conditions at once. You should use this operation just before performing clear() to check what entry\'s would be cleaned. Returned list is limited to first 100 entry\'s.")
@ManagedOperationParameters(value={,,,,,})
public final String[] list(long minSize,
                                                                       long maxSize,
                                                                       String minLastModifyDate,
                                                                       String maxLastModifiDate,
                                                                       String minExpiresDate,
                                                                       String maxExpiresDate)
List all cache entry's that that matches all conditions in parameters. All parameters are connected logical AND, so to perform action cache entry should match all conditions at once. You should use this operation just before performing clear() to check what entry's would be cleaned. Returned list is limited to first 100 entry's.

Parameters:
minSize - Minimal size (in bytes) of cache entry. If value of this parameter < 0 then it isn't consider.
maxSize - Maximum size (in bytes) of cache entry. If value of this parameter < 0 then it isn't consider.
minLastModifyDate - If this parameter is null or is empty it isn't consider.
maxLastModifiDate - If this parameter is null or is empty it isn't consider.
minExpiresDate - This parameter apply's only to ExpiresCacheKey entry's. If this parameter is null or is empty it isn't consider.
maxExpiresDate - This parameter apply's only to ExpiresCacheKey entry's. If this parameter is null or is empty it isn't consider.
Returns:


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.