GigaSpaces XAP 10.0.1 API

com.gigaspaces.cluster.replication.gateway.conflict
Interface DataConflictOperation

All Superinterfaces:
DataSyncOperation

public interface DataConflictOperation
extends DataSyncOperation

Provides an interface for handling a conflicting data operation.

Conflicting operations can be resolved using the abort() and override() methods.

It is important to understand that override() acts differently for each DataConflictOperation.OperationType (refer to ConflictCause implementations for more information).

Since:
8.0.3
Author:
eitany, idan

Nested Class Summary
static class DataConflictOperation.OperationType
          Deprecated. since 9.0.1 - DataSyncOperationType.
 
Method Summary
 void abort()
          Determines that the operation will be aborted.
 ConflictCause getConflictCause()
           
 Object getOperationEntry()
          Deprecated. since 9.0.1 - use DataSyncOperation.getDataAsDocument() or DataSyncOperation.getDataAsObject() instead.
 DataConflictOperation.OperationType getOperationType()
          Deprecated. since 9.0.1 - use DataSyncOperation.getDataSyncOperationType() instead.
 int getResolveAttempt()
           
 boolean hasConflict()
           
 void override()
          Determines that the operation will be overridden.
 boolean supportsAbort()
           
 boolean supportsOverride()
           
 
Methods inherited from interface com.gigaspaces.sync.DataSyncOperation
getDataAsDocument, getDataAsObject, getDataSyncOperationType, getSpaceId, getTypeDescriptor, getUid, supportsDataAsDocument, supportsDataAsObject, supportsGetSpaceId, supportsGetTypeDescriptor
 

Method Detail

getOperationType

@Deprecated
DataConflictOperation.OperationType getOperationType()
Deprecated. since 9.0.1 - use DataSyncOperation.getDataSyncOperationType() instead.

Returns:
The operation type.

getConflictCause

ConflictCause getConflictCause()
Returns:
The ConflictCause instance representing the conflict.

hasConflict

boolean hasConflict()
Returns:
true if that operation had a conflict, otherwise false.

getOperationEntry

@Deprecated
Object getOperationEntry()
Deprecated. since 9.0.1 - use DataSyncOperation.getDataAsDocument() or DataSyncOperation.getDataAsObject() instead.

Returns:
The user entry the operation had a conflict for.

abort

void abort()
Determines that the operation will be aborted. This can only be used if the supportsAbort() returns true.


override

void override()
Determines that the operation will be overridden. This can only be used if the supportsOverride() returns true.

It is possible to change the operation's entry data using the DataSyncOperation.getDataAsObject() or DataSyncOperation.getDataAsDocument() methods.


supportsOverride

boolean supportsOverride()
Returns:
true if overriding the operation is supported, otherwise false.

supportsAbort

boolean supportsAbort()
Returns:
true of aborting the operation is supported, otherwise false.

getResolveAttempt

int getResolveAttempt()
Returns:
The current resolve attempt number for the operation.

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.