public class RedisKeyExpiredEvent<T> extends RedisKeyspaceEvent
RedisKeyExpiredEvent is a Redis specific ApplicationEvent published when a particular key in Redis
expires. It can hold the value of the expired key next to the key, but is not required to do so.source| Constructor and Description |
|---|
RedisKeyExpiredEvent(byte[] key)
Creates new
RedisKeyExpiredEvent. |
RedisKeyExpiredEvent(byte[] key,
Object value)
Creates new
RedisKeyExpiredEvent |
RedisKeyExpiredEvent(String channel,
byte[] key,
Object value)
Creates new
RedisKeyExpiredEvent |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getId()
Get the expired objects id.
|
String |
getKeyspace()
Gets the keyspace in which the expiration occured.
|
Object |
getValue()
Get the expired Object
|
String |
toString() |
getChannel, getSourcegetTimestamppublic RedisKeyExpiredEvent(byte[] key)
RedisKeyExpiredEvent.key - the expired key.public RedisKeyExpiredEvent(byte[] key,
@Nullable
Object value)
RedisKeyExpiredEventkey - the expired key.value - the value of the expired key. Can be null.public RedisKeyExpiredEvent(@Nullable String channel, byte[] key, @Nullable Object value)
RedisKeyExpiredEventchannel - the Pub/Sub channel through which this event was received.key - the expired key.value - the value of the expired key. Can be null.public String getKeyspace()
public byte[] getId()
public String toString()
toString in class EventObjectCopyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.