|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.operations.AbstractOperation
messif.operations.data.DeleteByLocatorOperation
public class DeleteByLocatorOperation
Operation for deleting an object.
The operation contains a set of locator URIs
.
All the objects that have any of these locators set are deleted from an index structure.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class messif.operations.AbstractOperation |
---|
AbstractOperation.DataEqualOperation, AbstractOperation.OperationConstructor, AbstractOperation.OperationName |
Field Summary |
---|
Fields inherited from class messif.operations.AbstractOperation |
---|
errValue, operID, suppData |
Constructor Summary | |
---|---|
|
DeleteByLocatorOperation(java.util.Collection<java.lang.String> locators)
Creates a new instance of DeleteByLocatorOperation. |
|
DeleteByLocatorOperation(java.util.Collection<java.lang.String> locators,
int deleteLimit)
Creates a new instance of DeleteByLocatorOperation. |
protected |
DeleteByLocatorOperation(java.util.Set<java.lang.String> locators,
int deleteLimit)
Creates a new instance of DeleteByLocatorOperation. |
|
DeleteByLocatorOperation(java.lang.String[] locators)
Creates a new instance of DeleteByLocatorOperation. |
|
DeleteByLocatorOperation(java.lang.String[] locators,
int deleteLimit)
Creates a new instance of DeleteByLocatorOperation. |
Method Summary | |
---|---|
void |
addDeletedObject(LocalAbstractObject deletedObject)
Mark the specified object as deleted by this operation. |
void |
clearSurplusData()
Clear non-messif data stored in operation. |
protected boolean |
dataEqualsImpl(AbstractOperation obj)
Indicates whether some other operation has the same data as this one. |
int |
dataHashCode()
Returns a hash code value for the data 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.Set<java.lang.String> |
getLocators()
Returns the locators of objects to delete. |
java.util.List<LocalAbstractObject> |
getObjects()
Returns the list of all actually deleted objects. |
boolean |
isLimitReached()
Returns whether the number of deleted objects has reached the deleteLimit . |
void |
updateFrom(AbstractOperation operation)
Update the operation result. |
boolean |
wasSuccessful()
Returns true if this operation was successfuly completed. |
Methods inherited from class messif.operations.AbstractOperation |
---|
appendArguments, appendErrorCode, clone, createOperation, dataEquals, endOperation, equals, getAnnotatedConstructor, getAnnotatedConstructor, getConstructorArgumentDescriptions, getConstructorArgumentDescriptions, getConstructorArguments, getConstructorArguments, getConstructorDescription, getErrorCode, getName, getName, getOperationID, hashCode, isFinished, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected DeleteByLocatorOperation(java.util.Set<java.lang.String> locators, int deleteLimit)
locators
- collection of locators of objects to deletedeleteLimit
- the maximal number of deleted objects (zero means unlimited)public DeleteByLocatorOperation(java.util.Collection<java.lang.String> locators, int deleteLimit)
locators
- collection of locators of objects to deletedeleteLimit
- the maximal number of deleted objects (zero means unlimited)public DeleteByLocatorOperation(java.util.Collection<java.lang.String> locators)
locators
- collection of locators of objects to deletepublic DeleteByLocatorOperation(java.lang.String[] locators, int deleteLimit)
locators
- collection of locators of objects to deletedeleteLimit
- the maximal number of deleted objects (zero means unlimited)public DeleteByLocatorOperation(java.lang.String[] locators)
locators
- collection of locators of objects to deleteMethod Detail |
---|
public java.util.Set<java.lang.String> getLocators()
public int getDeleteLimit()
public boolean isLimitReached()
deleteLimit
.
public java.util.List<LocalAbstractObject> getObjects()
public java.lang.Object getArgument(int index) throws java.lang.IndexOutOfBoundsException
getArgument
in class AbstractOperation
index
- index of an argument passed to constructor
java.lang.IndexOutOfBoundsException
- if index parameter is out of rangepublic int getArgumentCount()
getArgumentCount
in class AbstractOperation
public boolean wasSuccessful()
wasSuccessful
in class AbstractOperation
public void endOperation()
endOperation
in class AbstractOperation
public void addDeletedObject(LocalAbstractObject deletedObject)
deletedObject
- the object that was deletedpublic void updateFrom(AbstractOperation operation)
updateFrom
in class AbstractOperation
operation
- foreign operation from which to update this onepublic void clearSurplusData()
clearSurplusData
in interface Clearable
clearSurplusData
in class AbstractOperation
protected boolean dataEqualsImpl(AbstractOperation obj)
dataEqualsImpl
in class AbstractOperation
obj
- the reference object with which to compare.
true
if this object has the same data as the obj
argument; false
otherwise.public int dataHashCode()
dataHashCode
in class AbstractOperation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |