-
- Type Parameters:
T
- the type of the object to remove
- All Known Implementing Classes:
GluonCloudObjectDataWriterImpl
,RestObjectDataWriterAndRemover
public interface ObjectDataRemover<T>
An ObjectDataRemover is an entity that has the ability to remove an object. The actual source and method that are used for removing the object is completely up to the implementation. The most common scenario is that the remover uses anOutputDataSource
that is able to remove the object that the source points to.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<T>
removeObject(GluonObservableObject<T> observable)
Removes the object and optionally returns an object.
-
-
-
Method Detail
-
removeObject
Optional<T> removeObject(GluonObservableObject<T> observable) throws IOException
Removes the object and optionally returns an object. The actual method that removes the object is completely left to the implementation. This method is called byDataProvider.removeObject(GluonObservableObject, ObjectDataRemover)
to initiate the actual removal process. If this method returns a non-empty Optional, the object that is contained in the Optional will be set on the providedobservable
object. Otherwise, the value of theobservable
object will be set tonull
. When the remove operation completed successfully, the state of the providedobservable
will be set toConnectState.REMOVED
.- Parameters:
observable
- the observable object that needs to be removed- Returns:
- an optional containing an object that will ultimately be set on the provided GluonObservableObject
- Throws:
IOException
- when an exception occurred during the removal process
-
-