Cache validation of the given move, discarding any previously cached value.

@param move move applied to the current solution
@param validation validation of obtained neighbour
169831
@Override
    public final void cacheMoveValidation(Move<?> move, Validation validation) {
        validatedMove = move;
        this.validation = validation;
    }
86956
public void cacheCleared(String cacheName) {
            InvalidationTableList list = (InvalidationTableList) cacheinvalidationTables.get(cacheName);
            if (list != null ) 
                    list.clear();
	}
125880
@Override
    public boolean validate(byte[] handshake) {
        if (validateScheme(handshake, 0)) {
            algorithm = 0;
            return true;
        }
        if (validateScheme(handshake, 1)) {
            algorithm = 1;
            return true;
        }
        log.error("Unable to validate server");
        return false;
    }
994370
protected void cancelTransfers(IntSet removedSegments) {
      synchronized (transferMapsLock) {
         List<Integer> segmentsToCancel = new ArrayList<>(removedSegments);
         while (!segmentsToCancel.isEmpty()) {
            int segmentId = segmentsToCancel.remove(0);
            List<InboundTransferTask> inboundTransfers = transfersBySegment.get(segmentId);
            if (inboundTransfers != null) { // we need to check the transfer was not already completed
               for (InboundTransferTask inboundTransfer : inboundTransfers) {
                  IntSet cancelledSegments = IntSets.mutableCopyFrom(removedSegments);
                  cancelledSegments.retainAll(inboundTransfer.getSegments());
                  segmentsToCancel.removeAll(cancelledSegments);
                  transfersBySegment.keySet().removeAll(cancelledSegments);
                  //this will also remove it from transfersBySource if the entire task gets cancelled
                  inboundTransfer.cancelSegments(cancelledSegments);
                  if (inboundTransfer.isCancelled()) {
                     removeTransfer(inboundTransfer);
                  }
               }
            }
         }
      }
   }
1011129
private void applyPoolConfiguration(PoolConfiguration pc,
                                       org.ironjacamar.common.api.metadata.common.Validation v)
   {
      if (v != null)
      {
         if (v.isValidateOnMatch() != null)
            pc.setValidateOnMatch(v.isValidateOnMatch().booleanValue());

         if (v.isBackgroundValidation() != null)
            pc.setBackgroundValidation(v.isBackgroundValidation().booleanValue());

         if (v.getBackgroundValidationMillis() != null)
            pc.setBackgroundValidationMillis(v.getBackgroundValidationMillis().longValue());

         if (v.isUseFastFail() != null)
            pc.setUseFastFail(v.isUseFastFail().booleanValue());
      }
   }
816557
void handleValidationChange(CmsValidationContext validationContext) {

        if (validationContext.hasValidationErrors()) {
            String locales = "";
            for (String id : validationContext.getInvalidEntityIds()) {
                if (locales.length() > 0) {
                    locales += ", ";
                }
                String locale = CmsContentDefinition.getLocaleFromId(id);
                if (m_availableLocales.containsKey(locale)) {
                    locales += m_availableLocales.get(locale);
                }
            }
            disableSave(Messages.get().key(Messages.GUI_TOOLBAR_VALIDATION_ERRORS_1, locales));
        } else if (!m_changedEntityIds.isEmpty()) {
            enableSave();
        }
    }
284796
@Override
    public boolean validateAction(String action) {
        boolean result = false;
        if (action.equals(MessagingSecurityConstants.OPERATION_TYPE_SEND) ||
            action.equals(MessagingSecurityConstants.OPERATION_TYPE_RECEIVE)) {
            result = true;
        }
        return result;
    }
1358661
public void validate(final Runnable nextAction) {

        validateFull(m_structureId, getAliasPaths(), new AsyncCallback<Map<String, String>>() {

            public void onFailure(Throwable caught) {

                // do nothing

            }

            public void onSuccess(Map<String, String> result) {

                for (Map.Entry<String, String> entry : result.entrySet()) {
                    if (entry.getValue() != null) {
                        m_hasValidationErrors = true;
                    }
                }
                m_defaultValidationHandler.onSuccess(result);
                nextAction.run();
            }
        });
    }
1179315
public void doValidRecord(boolean bDisplayOption)
    {   // Copy the key field to the master file and BYPASS the BEHAVIORS
        super.doValidRecord(bDisplayOption);
        if (m_bMoveOnValid)
        {
            int iMoveType = DBConstants.SCREEN_MOVE;  // Do trigger a record change.
            this.moveTheData(bDisplayOption, iMoveType);
        }
    }
652300
@Override
  public ActionRequestValidationException validate() {
    ActionRequestValidationException validationException = super.validate();
    if (termsEncoding != null && termsEncoding.equals(TermsEncoding.BYTES)) {
      if (maxTermsPerShard == null) {
        validationException = ValidateActions.addValidationError("maxTermsPerShard not specified for terms encoding [bytes]", validationException);
      }
    }
    return validationException;
  }
223851
protected void copyErrors(ActionBeanContext source, ActionBeanContext destination) {
        destination.getValidationErrors().putAll(source.getValidationErrors());
    }
1219172
public static ArrayList<ValidationMessage> shiftLocation(Entry entry,
			int deletedBeginNs,boolean removeall) {
		ArrayList<Feature> gapFeatures = new ArrayList<Feature>();
		ArrayList<Feature> invalidFeatures = new ArrayList<Feature>();
		ArrayList<ValidationMessage> validationMessages = new ArrayList<ValidationMessage>();
		if (entry == null) {
			return null;
		}
		List<Feature> features = entry.getFeatures();
		for (int i = 0; i < features.size(); i++) {

			Feature feature = features.get(i);
			boolean invalidFeature = false;
			// New Sequence String Length
			long newSequenceLength = entry.getSequence().getLength();

			for (Location location : feature.getLocations().getLocations()) {

				/*
				 * check for all feature locations exists in the entry are
				 * within range of sequence Begin and End positions and shifting
				 * the locations of the feature according to the new sequence
				 * positions
				 */

				if (location.getBeginPosition() <= deletedBeginNs
						&& location.getEndPosition() <= deletedBeginNs) {

					location.setBeginPosition(location.getBeginPosition()
							- deletedBeginNs);
					location.setEndPosition(location.getEndPosition()
							- deletedBeginNs);

					if (feature.getName().equals(Feature.GAP_FEATURE_NAME)) {
						validationMessages.add(ValidationMessage.message(
								Severity.FIX, UTILS_2, location
										.getBeginPosition().toString(),
								location.getEndPosition().toString()));
						gapFeatures.add(feature);
						invalidFeature = true;
					} else {
						if(feature!=null&&!feature.getName().equals(Feature.SOURCE_FEATURE_NAME))
						{
						invalidFeatures.add(feature);
                        invalidFeature = true;
						}
					}

				} else if (location.getBeginPosition() <= deletedBeginNs
						&& location.getEndPosition() > deletedBeginNs) {
					location.setBeginPosition((long) 1);
					location.setEndPosition(location.getEndPosition()
							- deletedBeginNs);
					if (location.getEndPosition() > newSequenceLength)

					{
						location.setEndPosition(newSequenceLength);
					}
				} else if (location.getBeginPosition() > deletedBeginNs
						&& location.getEndPosition() > deletedBeginNs) {

					location.setBeginPosition(location.getBeginPosition()
							- deletedBeginNs);
					location.setEndPosition(location.getEndPosition()
							- deletedBeginNs);

					if (location.getBeginPosition() > newSequenceLength
							&& location.getEndPosition() > newSequenceLength) {
						if (feature.getName().equals(Feature.GAP_FEATURE_NAME)) {
							gapFeatures.add(feature);
                            ValidationMessage<Origin> message = ValidationMessage.message(
                                    Severity.FIX, UTILS_2, location.getBeginPosition().toString(),
                                    location.getEndPosition().toString());
                            message.getOrigins().add(feature.getOrigin());
                            validationMessages.add(message);
							invalidFeature = true;

						}

						else {
							if(feature!=null&&!feature.getName().equals(Feature.SOURCE_FEATURE_NAME))
							{
							invalidFeatures.add(feature);
                            invalidFeature = true;
							}
						}

					}

					if (location.getBeginPosition() <= newSequenceLength
							&& location.getEndPosition() > newSequenceLength)

					{
						location.setEndPosition(newSequenceLength);

					}

				}
				if (location.getBeginPosition().equals(location.getEndPosition())) {
					
					if(removeall)
					{
						location.setEndPosition(null);
					}
					else{
					if (feature.getName().equals(Feature.GAP_FEATURE_NAME)) {
						gapFeatures.add(feature);
                        ValidationMessage<Origin> message = ValidationMessage.message(
                                Severity.FIX, UTILS_2, location.getBeginPosition().toString(),
                                location.getEndPosition().toString());
                        message.getOrigins().add(feature.getOrigin());
                        validationMessages.add(message);
						invalidFeature = true;

					} else {
						if(feature!=null&&!feature.getName().equals(Feature.SOURCE_FEATURE_NAME))
						{
						invalidFeatures.add(feature);
                        invalidFeature = true;
						}
					}
				}
				
			}
			}
			
			// Reference Location shifting
			shiftReferenceLocation(entry , newSequenceLength);
			//set the new sequencelength
		    //entry.getSequence().setLength(newSequenceLength);
			
			// Qualifier Location Shifting
			Long newBeginLocation, newEndLocation = null;
			Location newLocation = null;
			if (!invalidFeature) {
				for (Qualifier qualifier : feature.getQualifiers()) {

					// TRANSL_EXCEPT_QUALIFIER

					if (qualifier.getName().equals(
                            Qualifier.TRANSL_EXCEPT_QUALIFIER_NAME)) {
						TranslExceptQualifier translExcepttqualifier = new TranslExceptQualifier(
								qualifier.getValue());

						/*if (shiftLocationQualifier(translExcepttqualifier,
								deletedBeginNs, feature) != null) {
							validationMessages.add(shiftLocationQualifier(
									translExcepttqualifier, deletedBeginNs,
									feature));
						}*/
					} /*else if (qualifier.getName().equals(
                            Qualifier.ANTICODON_QUALIFIER_NAME)) {

						AnticodonQualifier antiCodonqualifier = new AnticodonQualifier(
								qualifier.getValue());
						if (shiftLocationQualifier(antiCodonqualifier,
								deletedBeginNs, feature) != null) {
							validationMessages
									.add(shiftLocationQualifier(
											antiCodonqualifier, deletedBeginNs,
											feature));
						}

					} */else if (qualifier.getName().equals(
                            Qualifier.RPT_UNIT_RANGE_QUALIFIER_NAME)) {

						Rpt_Unit_RangeQualifier rptUnitRangequalifier = new Rpt_Unit_RangeQualifier(
								qualifier.getValue());
						if (shiftLocationQualifier(rptUnitRangequalifier,
								deletedBeginNs, feature) != null) {
							validationMessages.add(shiftLocationQualifier(
									rptUnitRangequalifier, deletedBeginNs,
									feature));
						}
					}

					else if (qualifier.getName().equals(
                            Qualifier.TAG_PEPTIDE_QUALIFIER_NAME)) {

						Tag_PeptideQualifier tagPeptidequalifier = new Tag_PeptideQualifier(
								qualifier.getValue());
						if (shiftLocationQualifier(tagPeptidequalifier,
								deletedBeginNs, feature) != null) {
							validationMessages.add(shiftLocationQualifier(
									tagPeptidequalifier, deletedBeginNs,
									feature));
						}
					}
				}

			}
		}

		if (gapFeatures.size() > 0) {
			for (Feature feature : gapFeatures) {

				entry.removeFeature(feature);

			}
		}
		if (invalidFeatures.size() > 0) {
			for (Feature feature : invalidFeatures) {
				ValidationMessage<Origin> message = ValidationMessage.message(
						Severity.FIX, UTILS_5, feature.getName(),
						feature.getName());
				message.getOrigins().add(feature.getOrigin());
				validationMessages.add(message);
				entry.removeFeature(feature);

			}
		}
		return validationMessages;
	}
33166
function cacheValid () {
    // false if cache result is null
    if (this.cached === null) {
        debug('view:select:collection:cacheValid:false:null', this.selectCacheKey)
        return false
    }
    // false if n does not match
    if (this.cached.n !== this.initialMaxRecordNumber) {
        debug('view:select:collection:cacheValid:false:maxRecordNumber', this.selectCacheKey)
        return false
    }
    // cache is valid
    debug('view:select:collection:cacheValid:true', this.selectCacheKey)
    return true
}
646349
private void correctDataValidation(final Sheet sheet, final RecordOperation recordOperation) {

        if(recordOperation.isNotExecuteRecordOperation()) {
            return;
        }

        //TODO: セルの結合も考慮する

        // 操作をしていないセルの範囲の取得
        final CellRangeAddress notOperateRange = new CellRangeAddress(
                recordOperation.getTopLeftPoisitoin().y,
                recordOperation.getBottomRightPosition().y - recordOperation.getCountInsertRecord(),
                recordOperation.getTopLeftPoisitoin().x,
                recordOperation.getBottomRightPosition().x
                );

        final List<? extends DataValidation> list = sheet.getDataValidations();
        for(DataValidation validation : list) {

            final CellRangeAddressList region = validation.getRegions().copy();
            boolean changedRange = false;
            for(CellRangeAddress range : region.getCellRangeAddresses()) {

                if(notOperateRange.isInRange(range.getFirstRow(), range.getFirstColumn())) {
                    // 自身のセルの範囲の場合は、行の範囲を広げる
                    range.setLastRow(recordOperation.getBottomRightPosition().y);
                    changedRange = true;

                } else if(notOperateRange.getLastRow() < range.getFirstRow()) {
                    // 自身のセルの範囲より下方にあるセルの範囲の場合、行の挿入や削除に影響を受けているので修正する。
                    if(recordOperation.isInsertRecord()) {
                        range.setFirstRow(range.getFirstRow() + recordOperation.getCountInsertRecord());
                        range.setLastRow(range.getLastRow() + recordOperation.getCountInsertRecord());

                    } else if(recordOperation.isDeleteRecord()) {
                        range.setFirstRow(range.getFirstRow() - recordOperation.getCountDeleteRecord());
                        range.setLastRow(range.getLastRow() - recordOperation.getCountDeleteRecord());

                    }
                    changedRange = true;
                }

            }

            // 修正した規則を、更新する。
            if(changedRange) {
                boolean updated = POIUtils.updateDataValidationRegion(sheet, validation.getRegions(), region);
                assert updated;
            }
        }

    }
594909
void validateBlock(Row row)
  {
    if (! row.getDatabase().isValidate()) {
      return;
    }
    
    int rowHead = _rowHead;
    int blobTail = _blobTail;
        
    if (rowHead < blobTail) {
      throw new IllegalStateException(this 
                                      + " rowHead:" + rowHead
                                      + " blobTail:" + blobTail); 
    }
    
    int rowOffset = _rowHead;
    
    byte []buffer = _buffer;

    while (rowOffset < BLOCK_SIZE) {
      int code = buffer[rowOffset] & CODE_MASK;
      
      switch (code) {
      case INSERT:
        row.validate(buffer, rowOffset, rowHead, blobTail);
        break;
        
      case INSERT_DEAD:
      case REMOVE:
        break;
        
      default:
        throw new IllegalStateException(this + " " + rowOffset + " " + code + " unknown code");
      }
      
      int len = getLength(code, row);
      
      if (len < 0 || len + rowOffset > BLOCK_SIZE) {
        throw new IllegalStateException(this + " " + rowOffset + " code:" + code + " len:" + len + " invalid len");
      }
      
      rowOffset += len;
    }  
  }
454483
private void validateType() {
      if (getType().isCarrierMovementRequired() && getCarrierMovement() == null) {
        throw new IllegalArgumentException("Carrier movement is required for event type " + getType());
      }
      if (!getType().isCarrierMovementRequired() && getCarrierMovement() != null) {
        throw new IllegalArgumentException("Carrier movement is not allowed with event type " + getType());
      }
    }
506980
public static void validate(OrderBy<?> orderBy,
                                ListExpressionValidation validation,
                                boolean ignoreUnknown) {
        if (orderBy == null) return;
        Iterator<Property> it = orderBy.getProperties().iterator();
        while (it.hasNext()) {
            validation.validate(it.next().getProperty());
            if (ignoreUnknown && !validation.lastValid()) {
                it.remove();
            }
        }
    }