public enum ReplicationMode extends Enum<ReplicationMode>
Enum Constant and Description |
---|
EXCEPTION
Throw an exception when a row already exists.
|
IGNORE
Ignore replicated entities when a row already exists.
|
LATEST_VERSION
When a row already exists, choose the latest version.
|
OVERWRITE
Overwrite existing rows when a row already exists.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
shouldOverwriteCurrentVersion(Object entity,
Object currentVersion,
Object newVersion,
VersionType versionType)
Determine whether the mode dictates that the data being replicated should overwrite the data found.
|
static ReplicationMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ReplicationMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ReplicationMode EXCEPTION
public static final ReplicationMode IGNORE
public static final ReplicationMode OVERWRITE
public static final ReplicationMode LATEST_VERSION
public static ReplicationMode[] values()
for (ReplicationMode c : ReplicationMode.values()) System.out.println(c);
public static ReplicationMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic abstract boolean shouldOverwriteCurrentVersion(Object entity, Object currentVersion, Object newVersion, VersionType versionType)
entity
- The entity being replicatedcurrentVersion
- The version currently on the target database table.newVersion
- The replicating versionversionType
- The version typetrue
indicates the data should be overwritten; false
indicates it should not.Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.