EventListener
This commit is contained in:
@@ -3,15 +3,18 @@
|
|||||||
*/
|
*/
|
||||||
package org.redkale.source;
|
package org.redkale.source;
|
||||||
|
|
||||||
|
import java.util.EventListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CacheSource订阅频道的消费监听器
|
* CacheSource订阅频道的消费监听器
|
||||||
*
|
*
|
||||||
* <p>详情见: https://redkale.org
|
* <p>详情见: https://redkale.org
|
||||||
*
|
*
|
||||||
* @author zhangjx
|
* @author zhangjx
|
||||||
|
* @param <T> 泛型
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
public interface CacheEventListener<T> {
|
public interface CacheEventListener<T> extends EventListener {
|
||||||
|
|
||||||
public void onMessage(String topic, T message);
|
public void onMessage(String topic, T message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,10 @@
|
|||||||
*/
|
*/
|
||||||
package org.redkale.util;
|
package org.redkale.util;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
import static java.lang.annotation.ElementType.METHOD;
|
import static java.lang.annotation.ElementType.METHOD;
|
||||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Resource资源被更新时的监听事件, 本注解只能标记在方法参数为ResourceEvent[]上 <br>
|
* @Resource资源被更新时的监听事件, 本注解只能标记在方法参数为ResourceEvent[]上 <br>
|
||||||
* 注意: 一个类只能存在一个@ResourceListener的方法, 多余的会被忽略 <br>
|
* 注意: 一个类只能存在一个@ResourceListener的方法, 多余的会被忽略 <br>
|
||||||
@@ -51,7 +50,7 @@ import java.lang.annotation.*;
|
|||||||
*
|
*
|
||||||
* @see org.redkale.annotation.ResourceChanged
|
* @see org.redkale.annotation.ResourceChanged
|
||||||
* @author zhangjx
|
* @author zhangjx
|
||||||
* @deprecated replaced by org.redkale.annotation.ResourceChanged
|
* @deprecated replaced by {@link org.redkale.annotation.ResourceChanged}
|
||||||
*/
|
*/
|
||||||
@Deprecated(since = "2.8.0")
|
@Deprecated(since = "2.8.0")
|
||||||
@Documented
|
@Documented
|
||||||
|
|||||||
Reference in New Issue
Block a user