javax.cache.event.CacheEntryEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redisson-all Show documentation
Show all versions of redisson-all Show documentation
Easy Redis Java client and Real-Time Data Platform. Valkey compatible. Sync/Async/RxJava3/Reactive API. Client side caching. Over 50 Redis based Java objects and services: JCache API, Apache Tomcat, Hibernate, Spring, Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Bloom filter, Scheduler, RPC
/**
* Copyright (c) 2011-2013 Terracotta, Inc.
* Copyright (c) 2011-2013 Oracle and/or its affiliates.
*
* All rights reserved. Use is subject to license terms.
*/
package javax.cache.event;
import javax.cache.Cache;
import java.util.EventObject;
/**
* A Cache entry event base class.
*
* @param the type of key
* @param the type of value
* @author Greg Luck
* @since 1.0
*/
public abstract class CacheEntryEvent extends EventObject
implements Cache.Entry {
private EventType eventType;
/**
* Constructs a cache entry event from a given cache as source
*
* @param source the cache that originated the event
*/
public CacheEntryEvent(Cache source, EventType eventType) {
super(source);
this.eventType = eventType;
}
/**
* {@inheritDoc}
*/
@Override
public final Cache getSource() {
return (Cache) super.getSource();
}
/**
* Returns the previous value, that existed prior to the
* modification of the Entry value.
*
* @return the previous value or null
if there was no previous value
*/
public abstract V getOldValue();
/**
* Whether the old value is available.
*
* @return true if the old value is populated
*/
public abstract boolean isOldValueAvailable();
/**
* Gets the event type of this event
*
* @return the event type.
*/
public final EventType getEventType() {
return eventType;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy