Class OGossipTask
java.lang.Object
com.orientechnologies.orient.server.distributed.task.OAbstractRemoteTask
com.orientechnologies.orient.server.distributed.impl.task.OGossipTask
- All Implemented Interfaces:
ORemoteTask
Task to manage the end of distributed transaction when no fix is needed (OFixTxTask) and all the
locks must be released. Locks are necessary to prevent concurrent modification of records before
the transaction is finished.
This task uses the same partition keys used by TxTask to avoid synchronizing all the worker threads (and queues).
This task uses the same partition keys used by TxTask to avoid synchronizing all the worker threads (and queues).
- Author:
- Luca Garulli (l.garulli--at--orientdb.com)
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.orientechnologies.orient.server.distributed.task.ORemoteTask
ORemoteTask.RESULT_STRATEGY -
Field Summary
FieldsFields inherited from class com.orientechnologies.orient.server.distributed.task.OAbstractRemoteTask
nodeSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(ODistributedRequestId msgId, OServer iServer, ODistributedServerManager iManager, ODatabaseDocumentInternal database) voidfromStream(DataInput in, ORemoteTaskFactory factory) longComputes the timeout according to the transaction size.intgetName()longgetSynchronousTimeout(int iSynchNodes) longgetTotalTimeout(int iTotalNodes) booleanbooleanvoidtoStream(DataOutput out) toString()Methods inherited from class com.orientechnologies.orient.server.distributed.task.OAbstractRemoteTask
getNodeSource, hasResponse, isIdempotent, setNodeSourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.server.distributed.task.ORemoteTask
finished, received
-
Field Details
-
FACTORYID
public static final int FACTORYID- See Also:
-
-
Constructor Details
-
OGossipTask
public OGossipTask()
-
-
Method Details
-
execute
public Object execute(ODistributedRequestId msgId, OServer iServer, ODistributedServerManager iManager, ODatabaseDocumentInternal database) throws Exception - Throws:
Exception
-
getQuorumType
-
isUsingDatabase
public boolean isUsingDatabase()- Specified by:
isUsingDatabasein interfaceORemoteTask- Overrides:
isUsingDatabasein classOAbstractRemoteTask
-
getResultStrategy
- Specified by:
getResultStrategyin interfaceORemoteTask- Overrides:
getResultStrategyin classOAbstractRemoteTask
-
toStream
- Specified by:
toStreamin interfaceORemoteTask- Overrides:
toStreamin classOAbstractRemoteTask- Throws:
IOException
-
fromStream
- Specified by:
fromStreamin interfaceORemoteTask- Overrides:
fromStreamin classOAbstractRemoteTask- Throws:
IOException
-
getDistributedTimeout
public long getDistributedTimeout()Computes the timeout according to the transaction size.- Specified by:
getDistributedTimeoutin interfaceORemoteTask- Overrides:
getDistributedTimeoutin classOAbstractRemoteTask- Returns:
-
getSynchronousTimeout
public long getSynchronousTimeout(int iSynchNodes) - Specified by:
getSynchronousTimeoutin interfaceORemoteTask- Overrides:
getSynchronousTimeoutin classOAbstractRemoteTask
-
getTotalTimeout
public long getTotalTimeout(int iTotalNodes) - Specified by:
getTotalTimeoutin interfaceORemoteTask- Overrides:
getTotalTimeoutin classOAbstractRemoteTask
-
getName
-
getFactoryId
public int getFactoryId() -
isNodeOnlineRequired
public boolean isNodeOnlineRequired()- Specified by:
isNodeOnlineRequiredin interfaceORemoteTask- Overrides:
isNodeOnlineRequiredin classOAbstractRemoteTask
-
toString
- Overrides:
toStringin classOAbstractRemoteTask
-