EventListener

This commit is contained in:
redkale
2024-06-08 16:55:24 +08:00
parent 6bcb1de304
commit ca7c0d47b0
2 changed files with 6 additions and 4 deletions

View File

@@ -3,15 +3,18 @@
*/
package org.redkale.source;
import java.util.EventListener;
/**
* CacheSource订阅频道的消费监听器
*
* <p>详情见: https://redkale.org
*
* @author zhangjx
* @param <T> 泛型
* @since 2.8.0
*/
public interface CacheEventListener<T> {
public interface CacheEventListener<T> extends EventListener {
public void onMessage(String topic, T message);
}

View File

@@ -5,11 +5,10 @@
*/
package org.redkale.util;
import java.lang.annotation.*;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.*;
/**
* &#64;Resource资源被更新时的监听事件, 本注解只能标记在方法参数为ResourceEvent[]上 <br>
* 注意: 一个类只能存在一个&#64;ResourceListener的方法 多余的会被忽略 <br>
@@ -51,7 +50,7 @@ import java.lang.annotation.*;
*
* @see org.redkale.annotation.ResourceChanged
* @author zhangjx
* @deprecated replaced by org.redkale.annotation.ResourceChanged
* @deprecated replaced by {@link org.redkale.annotation.ResourceChanged}
*/
@Deprecated(since = "2.8.0")
@Documented