public class ReplicationAction
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EVENT_TOPIC
Event topic for replication status events.
|
static java.lang.String |
PN_ACTION_TYPE
Replication action type property name.
|
static java.lang.String |
PN_PATH
Replication path property name.
|
static java.lang.String |
PROPERTY_MODIFICATION_DATE
The OSGi event property containing the modification date
|
static java.lang.String |
PROPERTY_PATH
The OSGi event property containing the path
|
static java.lang.String |
PROPERTY_PATHS
The OSGi event property containing the paths
|
static java.lang.String |
PROPERTY_REVISION
The OSGi event property containing the replicated revision (optional)
|
static java.lang.String |
PROPERTY_TYPE
The OSGi event property containing replication action
|
static java.lang.String |
PROPERTY_USER_ID
The OSGi event property containing the user id
|
Constructor and Description |
---|
ReplicationAction(ReplicationActionType type,
java.lang.String path)
Create a new instance of this class.
|
ReplicationAction(ReplicationActionType type,
java.lang.String[] paths,
long time,
java.lang.String userId,
java.lang.String revision) |
ReplicationAction(ReplicationActionType type,
java.lang.String path,
long time,
java.lang.String userId,
java.lang.String revision) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
createEventProperties(boolean distribute)
Create the OSGi event properties.
|
static ReplicationAction |
fromEvent(Event evt)
Convert an OSGi event to a replication event.
|
AgentConfig |
getConfig()
Return the agent config.
|
ReplicationLog |
getLog()
Return the replication log.
|
java.lang.String |
getPath()
Returns the path
|
java.lang.String[] |
getPaths()
Returns the replication paths.
|
java.lang.String |
getRevision()
Returns the revision
|
long |
getTime()
Returns the replication time
|
ReplicationActionType |
getType()
Returns the action type
|
java.lang.String |
getUserId()
Returns the user id.
|
void |
setConfig(AgentConfig config)
Set the agent config.
|
void |
setLog(ReplicationLog log)
Set the replication log.
|
Event |
toEvent()
Create an OSGi event out of the replication event.
|
Event |
toEvent(boolean distribute)
Create an OSGi event out of the replication event.
|
java.lang.String |
toString() |
public static final java.lang.String EVENT_TOPIC
public static final java.lang.String PROPERTY_MODIFICATION_DATE
public static final java.lang.String PROPERTY_USER_ID
public static final java.lang.String PROPERTY_PATH
public static final java.lang.String PROPERTY_PATHS
public static final java.lang.String PROPERTY_TYPE
public static final java.lang.String PROPERTY_REVISION
public static final java.lang.String PN_PATH
public static final java.lang.String PN_ACTION_TYPE
public ReplicationAction(ReplicationActionType type, java.lang.String path, long time, java.lang.String userId, java.lang.String revision)
public ReplicationAction(ReplicationActionType type, java.lang.String[] paths, long time, java.lang.String userId, java.lang.String revision)
public ReplicationAction(ReplicationActionType type, java.lang.String path)
type
- action typepath
- pathpublic ReplicationActionType getType()
public java.lang.String getPath()
public java.lang.String[] getPaths()
public java.lang.String getRevision()
public long getTime()
public java.lang.String getUserId()
public AgentConfig getConfig()
public void setConfig(AgentConfig config)
config
- agent configpublic ReplicationLog getLog()
public void setLog(ReplicationLog log)
log
- the logpublic java.lang.String toString()
toString
in class java.lang.Object
public static ReplicationAction fromEvent(Event evt)
evt
- The OSGi eventpublic java.util.Map<java.lang.String,java.lang.Object> createEventProperties(boolean distribute)
distribute
- Whether this event should be distributed across the cluster.public Event toEvent()
public Event toEvent(boolean distribute)
distribute
- if true
a distributed event is createdCopyright © 2010 - 2020 Adobe. All Rights Reserved