- java.lang.Object
-
- java.lang.Enum<ImportMode>
-
- org.snmp4j.agent.io.ImportMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ImportMode>
public enum ImportMode extends java.lang.Enum<ImportMode>
The definition of import modes for MIB data.- Version:
- 3.0
- Author:
- Frank Fock
-
-
Enum Constant Summary
Enum Constants Enum Constant Description create
Only create new instances.replaceCreate
Replaces existing data, if there is any data available for import for the currentManagedObject
and creates data that does not yet exist.restoreChanges
Replaces existing data that has aStorageType.nonVolatile
.update
Only update existing data.updateCreate
In contrast toREPLACE_CREATE
, only existing data is updated or new data is created.
-
Field Summary
Fields Modifier and Type Field Description static int
CREATE
Only create new instances.static int
REPLACE_CREATE
Replaces existing data, if there is any data available for import for the currentManagedObject
and creates data that does not yet exist.static int
RESTORE_CHANGES
Replaces existing data that has aStorageType.nonVolatile
.static int
UPDATE
Only update existing data.static int
UPDATE_CREATE
In contrast toREPLACE_CREATE
, only existing data is updated or new data is created.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImportMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ImportMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
restoreChanges
public static final ImportMode restoreChanges
Replaces existing data that has aStorageType.nonVolatile
. Rows of typeStorageType.permanent
are updated if a row with the same index exists in the import data for the currentManagedObject
and creates data that does not yet exist.- Since:
- 3.0
-
replaceCreate
public static final ImportMode replaceCreate
Replaces existing data, if there is any data available for import for the currentManagedObject
and creates data that does not yet exist.
-
updateCreate
public static final ImportMode updateCreate
In contrast toREPLACE_CREATE
, only existing data is updated or new data is created. Existing data for aManagedObject
which is not updated through imported data, will not be changed (deleted) during import.
-
update
public static final ImportMode update
Only update existing data. No new instances are created and nothing deleted.
-
create
public static final ImportMode create
Only create new instances. No updates at all.
-
-
Field Detail
-
RESTORE_CHANGES
public static final int RESTORE_CHANGES
Replaces existing data that has aStorageType.nonVolatile
. Rows of typeStorageType.permanent
are updated if a row with the same index exists in the import data for the currentManagedObject
and creates data that does not yet exist.- Since:
- 3.0
- See Also:
- Constant Field Values
-
REPLACE_CREATE
public static final int REPLACE_CREATE
Replaces existing data, if there is any data available for import for the currentManagedObject
and creates data that does not yet exist.- See Also:
- Constant Field Values
-
UPDATE_CREATE
public static final int UPDATE_CREATE
In contrast toREPLACE_CREATE
, only existing data is updated or new data is created. Existing data for aManagedObject
which is not updated through imported data, will not be changed (deleted) during import.- See Also:
- Constant Field Values
-
UPDATE
public static final int UPDATE
Only update existing data. No new instances are created and nothing deleted.- See Also:
- Constant Field Values
-
CREATE
public static final int CREATE
Only create new instances. No updates at all.- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static ImportMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ImportMode c : ImportMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ImportMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-