public class DeleteOperation extends DataManipulationOperation
abstract object
.
All the objects that are data equal
to one
of these specified object are deleted from an index structure. Additionally, the operation
specifies max number of objects to be deleted for each of the specified object
and flag, if the locator is to be checked.AbstractOperation.OperationConstructor, AbstractOperation.OperationName
suppData, uuidOperationComparator
Constructor and Description |
---|
DeleteOperation(java.util.List<LocalAbstractObject> deletedObject,
int deleteLimit,
boolean checkLocator)
Creates a new instance of DeleteOperation.
|
DeleteOperation(LocalAbstractObject deletedObject)
Creates a new instance of DeleteOperation.
|
DeleteOperation(LocalAbstractObject deletedObject,
int deleteLimit)
Creates a new instance of DeleteOperation.
|
DeleteOperation(LocalAbstractObject deletedObject,
int deleteLimit,
boolean checkLocator)
Creates a new instance of DeleteOperation.
|
Modifier and Type | Method and Description |
---|---|
void |
addDeletedObject(LocalAbstractObject deletedObject)
Mark the specified object as deleted by this operation.
|
void |
clearSurplusData()
Clear non-messif data stored in operation.
|
DeleteOperation |
clone()
Create a duplicate of this operation.
|
void |
endOperation()
End operation successfully.
|
java.lang.Object |
getArgument(int index)
Returns argument that was passed while constructing instance.
|
int |
getArgumentCount()
Returns number of arguments that were passed while constructing this instance.
|
int |
getDeleteLimit()
Returns the maximal number of deleted objects.
|
java.util.List<LocalAbstractObject> |
getObjects()
Returns the list of all actually deleted objects.
|
java.util.List<LocalAbstractObject> |
getObjectsToDelete()
Returns the objects against which to match the deleted objects.
|
boolean |
isCheckingLocator()
Returns the flag whether to check that the deleted object's locator
is equal to
objectsToDelete 's locator. |
void |
updateFrom(AbstractOperation operation)
Update the error code of this operation from another operation.
|
boolean |
wasSuccessful()
Returns true if this operation has finished successfuly.
|
appendArguments, appendErrorCode, containsParameter, createOperation, endOperation, equals, getAnnotatedConstructor, getAnnotatedConstructor, getArgumentString, getConstructorArgumentDescriptions, getConstructorArgumentDescriptions, getConstructorArguments, getConstructorArguments, getConstructorDescription, getErrorCode, getName, getName, getOperationID, getParameter, getParameter, getParameter, getParameterCount, getParameterMap, getParameterNames, getRequiredParameter, getRequiredParameter, hashCode, isErrorCode, isFinished, removeParameter, setParameter, toString
public DeleteOperation(LocalAbstractObject deletedObject, int deleteLimit, boolean checkLocator)
deletedObject
- the object to match the data againstdeleteLimit
- the maximal number of deleted objects (zero means unlimited)checkLocator
- flag whether to check that the deleted object's locator is equal to objectsToDelete
's locatorpublic DeleteOperation(java.util.List<LocalAbstractObject> deletedObject, int deleteLimit, boolean checkLocator)
deletedObject
- the object to match the data againstdeleteLimit
- the maximal number of deleted objects (zero means unlimited)checkLocator
- flag whether to check that the deleted object's locator is equal to objectsToDelete
's locatorpublic DeleteOperation(LocalAbstractObject deletedObject, int deleteLimit)
deletedObject
- the object to match the data againstdeleteLimit
- the maximal number of deleted objects (zero means unlimited)public DeleteOperation(LocalAbstractObject deletedObject)
deletedObject
- the object to match the data againstpublic DeleteOperation clone() throws java.lang.CloneNotSupportedException
AbstractOperation
AbstractOperation.suppData
) is not cloned (but the reference is kept).
Note also that the answer of the query operations is not cloned but
a new collection is created.
The additional parameters are cloned - the map, not the values of the parameters.clone
in class AbstractOperation
java.lang.CloneNotSupportedException
- if the operation instance cannot be clonedpublic java.util.List<LocalAbstractObject> getObjectsToDelete()
public int getDeleteLimit()
public boolean isCheckingLocator()
objectsToDelete
's locator.public java.util.List<LocalAbstractObject> getObjects()
public void addDeletedObject(LocalAbstractObject deletedObject)
deletedObject
- the object that was deletedpublic java.lang.Object getArgument(int index) throws java.lang.IndexOutOfBoundsException
AbstractOperation
getArgument
in class AbstractOperation
index
- zero-based index of an argument passed to constructorjava.lang.IndexOutOfBoundsException
- if index parameter is out of rangepublic int getArgumentCount()
AbstractOperation
getArgumentCount
in class AbstractOperation
public boolean wasSuccessful()
AbstractOperation
wasSuccessful
in class AbstractOperation
public void endOperation()
AbstractOperation
endOperation
in class AbstractOperation
public void updateFrom(AbstractOperation operation)
AbstractOperation
updateFrom
in class AbstractOperation
operation
- the source operation from which to get the updatepublic void clearSurplusData()
AbstractOperation
parameters
that are Clearable
are cleared
and the other non-primitive
parameters are removed from the parameters.clearSurplusData
in interface Clearable
clearSurplusData
in class AbstractOperation