이 콘텐츠는 선택한 언어로 제공되지 않습니다.
15.2. Listener Example
The following example defines a listener in JBoss Data Grid that prints some information each time a new entry is added to the cache:
@Listener
public class PrintWhenAdded {
@CacheEntryCreated
public void print(CacheEntryCreatedEvent event) {
System.out.println("New entry " + event.getKey() + " created in the cache");
}
}