Package i5.las2peer.api.persistency
Interface EnvelopeCollisionHandler
public interface EnvelopeCollisionHandler
This interface can be used to implement a handler that is called if a collision occurs during a store operation.
-
Method Summary
Modifier and TypeMethodDescriptiononCollision
(Envelope toStore, Envelope inNetwork) This method is called if an envelope is already known for the given identifier and version.
-
Method Details
-
onCollision
This method is called if an envelope is already known for the given identifier and version.- Parameters:
toStore
- This is the envelope that was requested to be stored in the network.inNetwork
- This is the colliding envelope that was fetched from the network.- Returns:
- The merged content from both envelopes, which is automatically wrapped in a new store operation.
- Throws:
MergeFailedException
- If there should be made no further merging attempt.
-