public class Event extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EVENT_BEAN_PREFIX |
static String |
EVENT_NAME_START |
static String |
EVENT_NAME_STOP |
static String |
FIELD_DATA_OWNER |
static String |
FIELD_ID |
static String |
FIELD_LOCK_ID |
static String |
FIELD_LOCK_OWNER |
static String |
FIELD_LOCK_TIME |
static String |
FIELD_NAME |
static String |
FIELD_SCHEDULED_TIME |
static String |
FIELD_SESSION_ID |
static String |
INDEX_LOCK_ID |
static String |
INDEX_LOCK_OWNER |
static String |
INDEX_NAME |
static String |
INDEX_NEXT_AVAILABLE_EVENT |
Constructor and Description |
---|
Event(String name,
long scheduledTime,
Object data)
Construct a scheduled event with some data.
|
Event(String name,
long scheduledTime,
Object data,
boolean forceInMemoryDataStorage)
Construct a scheduled event with some data, optionally forcing the data to be stored
in memory.
|
Event(String name,
Object data)
Construct an event with some data, scheduling it for the current time.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanData()
Ensure that any locally-stored data is cleaned up
|
boolean |
equals(Object obj) |
String |
getDataKey() |
Object |
getDataObject()
Client-safe method to retrieve data based on in-memory or persisted storage
|
String |
getDataOwner() |
String |
getId() |
String |
getLockId() |
String |
getLockOwner() |
long |
getLockTime() |
String |
getName() |
long |
getScheduledTime() |
String |
getSessionId() |
int |
hashCode() |
void |
setDataOwner(String dataOwner) |
void |
setId(String id) |
void |
setLockId(String lockId) |
void |
setLockOwner(String lockOwner) |
void |
setLockTime(long lockTime) |
void |
setName(String name) |
void |
setScheduledTime(long scheduledTime) |
void |
setSessionId(String sessionId) |
String |
toString() |
public static final String FIELD_ID
public static final String FIELD_NAME
public static final String FIELD_SESSION_ID
public static final String FIELD_SCHEDULED_TIME
public static final String FIELD_LOCK_OWNER
public static final String FIELD_LOCK_TIME
public static final String FIELD_DATA_OWNER
public static final String FIELD_LOCK_ID
public static final String INDEX_NEXT_AVAILABLE_EVENT
public static final String INDEX_LOCK_OWNER
public static final String INDEX_NAME
public static final String INDEX_LOCK_ID
public static final String EVENT_NAME_START
public static final String EVENT_NAME_STOP
public static final String EVENT_BEAN_PREFIX
public Event(String name, Object data)
String
, will be persisted directly with this event.name
- the event namedata
- the event datapublic Event(String name, long scheduledTime, Object data)
String
,
will be persisted directly with this event.
Events that keep their data in memory cannot be executed by any other
running service and will therefore be lost if the server goes down.name
- the event namescheduledTime
- when the event should be processeddata
- the event datapublic Event(String name, long scheduledTime, Object data, boolean forceInMemoryDataStorage)
String
, then the data will be stored in local memory and a unique
look-up key will be persisted.
Events that keep their data in memory cannot be executed by any other
running service and will therefore be lost if the server goes down.name
- the event namescheduledTime
- when the event should be processeddata
- the event datapublic String getId()
public void setId(String id)
public String getName()
public void setName(String name)
public String getSessionId()
public void setSessionId(String sessionId)
public long getScheduledTime()
public void setScheduledTime(long scheduledTime)
public String getLockOwner()
public void setLockOwner(String lockOwner)
public long getLockTime()
public void setLockTime(long lockTime)
public Object getDataObject()
public String getDataKey()
public void cleanData()
public String getDataOwner()
public void setDataOwner(String dataOwner)
public String getLockId()
public void setLockId(String lockId)
Copyright © 2014. All rights reserved.