@Override public final int getMessageProcessorType() { // Make this serial so that it will be processed in the p2p msg reader // which gives it better performance. // don't use SERIAL_EXECUTOR if we may have to wait for a pending TX // else if may deadlock as the p2p msg reader thread will be blocked // don't use SERIAL_EXECUTOR for RepeatableRead isolation level else // it can block P2P reader thread thus blocking any possible commits // which could have released the SH lock this thread is waiting on return this.pendingTXId == null && getLockingPolicy() == LockingPolicy.NONE ? DistributionManager.SERIAL_EXECUTOR : DistributionManager.PARTITIONED_REGION_EXECUTOR; } }
@Override public final int getMessageProcessorType() { // Make this serial so that it will be processed in the p2p msg reader // which gives it better performance. // don't use SERIAL_EXECUTOR if we may have to wait for a pending TX // else if may deadlock as the p2p msg reader thread will be blocked // don't use SERIAL_EXECUTOR for RepeatableRead isolation level else // it can block P2P reader thread thus blocking any possible commits // which could have released the SH lock this thread is waiting on return this.pendingTXId == null && getLockingPolicy() == LockingPolicy.NONE ? DistributionManager.SERIAL_EXECUTOR : DistributionManager.PARTITIONED_REGION_EXECUTOR; } }
@Override public final int getMessageProcessorType() { // Make this serial so that it will be processed in the p2p msg reader // which gives it better performance. // don't use SERIAL_EXECUTOR if we may have to wait for a pending TX // else if may deadlock as the p2p msg reader thread will be blocked // don't use SERIAL_EXECUTOR for RepeatableRead isolation level else // it can block P2P reader thread thus blocking any possible commits // which could have released the SH lock this thread is waiting on return this.pendingTXId == null && getLockingPolicy() == LockingPolicy.NONE ? DistributionManager.SERIAL_EXECUTOR : DistributionManager.PARTITIONED_REGION_EXECUTOR; } }
/** * @see TransactionMessage#useTransactionProxy() */ @Override public boolean useTransactionProxy() { // use TX proxy to enable batching of read locks return getLockingPolicy().readOnlyCanStartTX(); }
@Override protected boolean requiresTXFlushAfterExecution() { // to flush any batched read locks return getLockingPolicy().readOnlyCanStartTX(); }
/** * @see TransactionMessage#useTransactionProxy() */ @Override public boolean useTransactionProxy() { // use TX proxy to enable batching of read locks return getLockingPolicy().readOnlyCanStartTX(); }
@Override protected boolean requiresTXFlushAfterExecution() { // to flush any batched read locks return getLockingPolicy().readOnlyCanStartTX(); }
@Override protected boolean requiresTXFlushAfterExecution() { // to flush any batched read locks return getLockingPolicy().readOnlyCanStartTX(); }
/** * @see TransactionMessage#useTransactionProxy() */ @Override public boolean useTransactionProxy() { // use TX proxy to enable batching of read locks return getLockingPolicy().readOnlyCanStartTX(); }