org.springframework.batch.admin.util
Class SimpleEhCacheInterceptor
java.lang.Object
org.springframework.batch.admin.util.SimpleEhCacheInterceptor
- All Implemented Interfaces:
- org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle
@ManagedResource
public class SimpleEhCacheInterceptor
- extends java.lang.Object
- implements org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.Lifecycle
- Author:
- Dave Syer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleEhCacheInterceptor
public SimpleEhCacheInterceptor()
setTimeout
public void setTimeout(int timeout)
- The expiry timeout of cache entries (a.k.a. time to live) in seconds.
Default 60.
- Parameters:
timeout - in seconds
setCacheName
public void setCacheName(java.lang.String name)
- The name of the cache used internally by EhCache. Defaults to
simple.
- Parameters:
name - the cache name to set
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
destroy
public void destroy()
throws java.lang.Exception
- Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
- Throws:
java.lang.Exception
invoke
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
throws java.lang.Throwable
- Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
- Throws:
java.lang.Throwable
start
@ManagedOperation
public void start()
- Specified by:
start in interface org.springframework.context.Lifecycle
stop
@ManagedOperation
public void stop()
- Specified by:
stop in interface org.springframework.context.Lifecycle
isRunning
@ManagedAttribute
public boolean isRunning()
- Specified by:
isRunning in interface org.springframework.context.Lifecycle
Copyright © 2011. All Rights Reserved.