public class ConflictBucket extends Object implements APIDelegate<ESConflict>
| Constructor and Description |
|---|
ConflictBucket(AbstractOperation myOperation,
AbstractOperation theirOperation)
Constructor.
|
ConflictBucket(Set<AbstractOperation> myOperations,
Set<AbstractOperation> theirOperations)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ESConflict |
createAPI()
Creates the API interface for this class.
|
Set<AbstractOperation> |
getAcceptedLocalOperations()
Returns the set of local operations that have been accepted.
|
AbstractOperation |
getMyOperation() |
Set<AbstractOperation> |
getMyOperations() |
Set<AbstractOperation> |
getRejectedRemoteOperations()
Returns the set of remote operations that have been rejected.
|
AbstractOperation |
getTheirOperation() |
Set<AbstractOperation> |
getTheirOperations() |
boolean |
isResolved()
Whether this conflict bucket is resolved.
|
void |
resolveConflict(Set<AbstractOperation> acceptedLocalOperations,
Set<AbstractOperation> rejectedRemoteOperations)
Resolve the conflict by specifying the accepted local operations and the rejected
remote operations.
|
void |
setMyOperation(AbstractOperation myOperation)
Set one of my operations representing all my operations.
|
void |
setTheirOperation(AbstractOperation theirOperation)
Set one of their operations representing all their operations.
|
ESConflict |
toAPI()
Returns the API interface of this class.
|
public ConflictBucket(AbstractOperation myOperation, AbstractOperation theirOperation)
myOperation - initial my operationtheirOperation - initial their operationpublic ConflictBucket(Set<AbstractOperation> myOperations, Set<AbstractOperation> theirOperations)
myOperations - initial set of my operationstheirOperations - initial set of their operationspublic Set<AbstractOperation> getMyOperations()
public Set<AbstractOperation> getTheirOperations()
public AbstractOperation getMyOperation()
public void setMyOperation(AbstractOperation myOperation)
myOperation - the operationpublic AbstractOperation getTheirOperation()
public void setTheirOperation(AbstractOperation theirOperation)
public ESConflict toAPI()
toAPI in interface APIDelegate<ESConflict>APIDelegate.toAPI()public ESConflict createAPI()
createAPI in interface APIDelegate<ESConflict>APIDelegate.createAPI()public void resolveConflict(Set<AbstractOperation> acceptedLocalOperations, Set<AbstractOperation> rejectedRemoteOperations)
acceptedLocalOperations - a set of local operations that have been acceptedrejectedRemoteOperations - a set of remote operations that have been rejectedpublic Set<AbstractOperation> getAcceptedLocalOperations()
public Set<AbstractOperation> getRejectedRemoteOperations()
public boolean isResolved()
true if this bucket is resolved, false otherwiseCopyright © 2017. All rights reserved.