@InterfaceAudience.Public public abstract class OperationWithAttributes extends Operation implements Attributes
Modifier and Type | Field and Description |
---|---|
private Map<String,byte[]> |
attributes |
static String |
ID_ATRIBUTE |
private int |
priority |
Modifier | Constructor and Description |
---|---|
protected |
OperationWithAttributes()
empty construction.
|
protected |
OperationWithAttributes(OperationWithAttributes clone) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getAttribute(String name)
Gets an attribute
|
protected long |
getAttributeSize() |
Map<String,byte[]> |
getAttributesMap()
Gets all attributes
|
String |
getId()
This method allows you to retrieve the identifier for the operation if one was set.
|
int |
getPriority() |
OperationWithAttributes |
setAttribute(String name,
byte[] value)
Sets an attribute.
|
OperationWithAttributes |
setId(String id)
This method allows you to set an identifier on an operation.
|
OperationWithAttributes |
setPriority(int priority) |
private Map<String,byte[]> attributes
public static final String ID_ATRIBUTE
private int priority
protected OperationWithAttributes()
protected OperationWithAttributes(OperationWithAttributes clone)
public OperationWithAttributes setAttribute(String name, byte[] value)
Attributes
setAttribute
in interface Attributes
name
- attribute namevalue
- attribute valuepublic byte[] getAttribute(String name)
Attributes
getAttribute
in interface Attributes
name
- attribute namepublic Map<String,byte[]> getAttributesMap()
Attributes
getAttributesMap
in interface Attributes
protected long getAttributeSize()
public OperationWithAttributes setId(String id)
public String getId()
public OperationWithAttributes setPriority(int priority)
public int getPriority()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.