{@inheritDoc}
<p>
184837
@Override
    public int size() {
        /*
         * It is possible for a thread to be interrupted or reschedule between the read of the producer and
         * consumer indices, therefore protection is required to ensure size is within valid range. In the
         * event of concurrent polls/offers to this method the size is OVER estimated as we read consumer
         * index BEFORE the producer index.
         */
        long afterCIndex = lvConsumerIndex();
        while (true) {
            final long beforeCIndex = afterCIndex;
            final long currentProducerIndex = lvProducerIndex();
            afterCIndex = lvConsumerIndex();
            if (beforeCIndex == afterCIndex) {
                return (int) (currentProducerIndex - afterCIndex);
            }
        }
    }
1025771
private void init(CmsResource resource, CmsObject cms) {

        List<CmsProperty> properties;

        try {
            properties = cms.readPropertyObjects(resource, false);
        } catch (CmsException e) {
            m_priority = 0;
            m_date = 0;
            return;
        }

        try {
            m_priority = Integer.parseInt(
                CmsProperty.get(CmsPriorityResourceCollector.PROPERTY_PRIORITY, properties).getValue());
        } catch (NumberFormatException e) {
            m_priority = CmsPriorityResourceCollector.PRIORITY_STANDARD;
        }

        try {
            m_date = Long.parseLong(CmsProperty.get(PROPERTY_DATE, properties).getValue());
        } catch (NumberFormatException e) {
            m_date = 0;
        }
    }
19042
public synchronized void setCms(CmsObject cms) {

        if (m_perThreadCmsObject == null) {
            m_perThreadCmsObject = new ThreadLocal<CmsObject>();
        }
        m_perThreadCmsObject.set(cms);
    }
494943
public void setResources(List value) {

        if (value == null) {
            m_resources = new ArrayList();
            return;
        }
        m_resources = CmsFileUtil.removeRedundancies(value);
    }
329908
@Override
    public <O> void set(String key, O value) {
        set(key,value,null,false);
    }
662849
@Override
    public void init() {

        if (CmsImageLoader.isEnabled()) {
            try {
                //reads the optional parameters for the gallery from the XML configuration
                I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(GALLERYTYPE_NAME);
                if (type instanceof CmsResourceTypeFolderExtended) {
                    m_galleryTypeParams = ((CmsResourceTypeFolderExtended)type).getFolderClassParams();
                } else {
                    m_galleryTypeParams = null;
                }
            } catch (CmsLoaderException e) {
                if (LOG.isErrorEnabled()) {
                    LOG.error(e.getLocalizedMessage(), e);
                }
            }
            m_defaultScaleParams = new CmsImageScaler(m_galleryTypeParams);
            if (!m_defaultScaleParams.isValid()) {
                // no valid parameters have been provided, use defaults
                m_defaultScaleParams.setType(0);
                m_defaultScaleParams.setPosition(0);
                m_defaultScaleParams.setWidth(120);
                m_defaultScaleParams.setHeight(90);
                m_defaultScaleParams.setColor(new Color(221, 221, 221));
            }
        } else {
            m_defaultScaleParams = null;
        }
    }
1357525
public function set($key, $value) {
		if (null === $key) {
			$this->_data[] = $value;
		} else {
			$this->_data[$key] = $value;
		}
	}
432430
public function validate($order, Constraint $constraint): void
    {
        /** @var OrderInterface $order */
        Assert::isInstanceOf($order, OrderInterface::class);

        /** @var OrderPaymentMethodEligibility $constraint */
        Assert::isInstanceOf($constraint, OrderPaymentMethodEligibility::class);

        $payments = $order->getPayments();

        foreach ($payments as $payment) {
            if (!$payment->getMethod()->isEnabled()) {
                $this->context->addViolation(
                    $constraint->message,
                    ['%paymentMethodName%' => $payment->getMethod()->getName()]
                );
            }
        }
    }
927764
protected void init() throws JspException {

        // initialize OpenCms access objects
        m_controller = CmsFlexController.getController(pageContext.getRequest());
        m_cms = m_controller.getCmsObject();

        try {
            // get the resource name from the selected container
            m_element = OpenCms.getADEManager().getCurrentElement(pageContext.getRequest());
            m_element.initResource(m_cms);
            if (m_cms.getRequestContext().getCurrentProject().isOnlineProject()
                && !m_element.isReleasedAndNotExpired()) {
                throw new CmsException(
                    Messages.get().container(
                        Messages.ERR_RESOURCE_IS_NOT_RELEASE_OR_EXPIRED_1,
                        m_element.getResource().getRootPath()));
            }
            if (m_locale == null) {
                // no locale set, use locale from users request context
                m_locale = m_cms.getRequestContext().getLocale();
            }

            // load content and store it
            CmsJspContentAccessBean bean;
            if ((m_element.isInMemoryOnly() || m_element.isTemporaryContent())
                && (m_element.getResource() instanceof CmsFile)) {
                I_CmsXmlDocument xmlContent = CmsXmlContentFactory.unmarshal(
                    m_cms,
                    m_element.getResource(),
                    pageContext.getRequest());
                bean = new CmsJspContentAccessBean(m_cms, m_locale, xmlContent);
            } else {
                bean = new CmsJspContentAccessBean(m_cms, m_locale, m_element.getResource());
            }
            storeAttribute(getVar(), bean);

            if (m_value != null) {
                // if the optional "val" parameter has been set, store the value map of the content in the page context scope
                storeAttribute(getVal(), bean.getValue());
            }

            if (m_rdfa != null) {
                // if the optional "rdfa" parameter has been set, store the rdfa map of the content in the page context scope
                storeAttribute(getRdfa(), bean.getRdfa());
            }

        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
            m_controller.setThrowable(e, m_cms.getRequestContext().getUri());
            throw new JspException(e);
        }
    }
401506
public function validate($value, Constraint $constraint): void
    {
        Assert::isInstanceOf($value, AttributeValueInterface::class);

        $defaultLocale = $this->localeProvider->getDefaultLocaleCode();
        $configuration = $value->getAttribute()->getConfiguration();

        if ($defaultLocale === $value->getLocaleCode()) {
            $configuration = array_merge($configuration, ['required' => true]);
        }

        /** @var AttributeTypeInterface $attributeType */
        $attributeType = $this->attributeTypeRegistry->get($value->getType());

        $attributeType->validate($value, $this->context, $configuration);
    }
566647
public function initCmsContent(CmsContent $cmsContent)
    {
        $this->cmsContent = $cmsContent;

        /**
         * @var $prop CmsContentProperty
         */
        if ($props = $this->cmsContent->cmsContentProperties) {
            $this->initProperties($props);
        }
    }
745780
public void setQuery(String query) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(query)) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_VALIDATE_SEARCH_QUERY_0));
        }
        m_query = query;
    }
826645
@Override
    public void setShareDataSourceWithCMP(final Boolean sharing) {
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "setShareDataSourceWithCMP", sharing);
        }
        _shareDataSourceWithCMP = sharing;
    }
1173885
public function validate($entity, Constraint $constraint): void
    {
        /** @var HasEnabledEntity $constraint */
        Assert::isInstanceOf($constraint, HasEnabledEntity::class);

        $enabled = $this->accessor->getValue($entity, $constraint->enabledPath);

        if ($enabled === true) {
            return;
        }

        $objectManager = $this->getProperObjectManager($constraint->objectManager, $entity);

        $this->ensureEntityHasProvidedEnabledField($objectManager, $entity, $constraint->enabledPath);

        $criteria = [$constraint->enabledPath => true];

        $repository = $objectManager->getRepository(get_class($entity));
        $results = $repository->{$constraint->repositoryMethod}($criteria);

        /* If the result is a MongoCursor, it must be advanced to the first
         * element. Rewinding should have no ill effect if $result is another
         * iterator implementation.
         */
        if ($results instanceof \Iterator) {
            $results->rewind();
        } elseif (is_array($results)) {
            reset($results);
        }

        if ($this->isLastEnabledEntity($results, $entity)) {
            $errorPath = null !== $constraint->errorPath ? $constraint->errorPath : $constraint->enabledPath;

            $this->context->buildViolation($constraint->message)->atPath($errorPath)->addViolation();
        }
    }
727730
@Override
    public void onXml(ClientProperties cp)
    {
        hsmd.onInitialize();
        if (cp != null)
        {
            hsmd.setClientProperties(cp);
        }
    }
1208428
@Override
	public void release() {
		super.release();
		setBase64Expr(null);
		setActionExpr(null);
		setModuleExpr(null);
		setAlignExpr(null);
		setAltExpr(null);
		setAltKeyExpr(null);
		setBorderExpr(null);
		setBundleExpr(null);
		setDirExpr(null);
		setHeightExpr(null);
		setHspaceExpr(null);
		setImageNameExpr(null);
		setIsmapExpr(null);
		setLangExpr(null);
		setLocaleExpr(null);
		setNameExpr(null);
		setOnclickExpr(null);
		setOndblclickExpr(null);
		setOnkeydownExpr(null);
		setOnkeypressExpr(null);
		setOnkeyupExpr(null);
		setOnmousedownExpr(null);
		setOnmousemoveExpr(null);
		setOnmouseoutExpr(null);
		setOnmouseoverExpr(null);
		setOnmouseupExpr(null);
		setPageExpr(null);
		setPageKeyExpr(null);
		setParamIdExpr(null);
		setParamNameExpr(null);
		setParamPropertyExpr(null);
		setParamScopeExpr(null);
		setPropertyExpr(null);
		setScopeExpr(null);
		setSrcExpr(null);
		setSrcKeyExpr(null);
		setStyleExpr(null);
		setStyleClassExpr(null);
		setStyleIdExpr(null);
		setTitleExpr(null);
		setTitleKeyExpr(null);
		setUseLocalEncodingExpr(null);
		setUsemapExpr(null);
		setVspaceExpr(null);
		setWidthExpr(null);
	}
601394
private void init(CmsResource resource, CmsObject cms) {

        List<CmsProperty> properties;

        try {
            properties = cms.readPropertyObjects(resource, false);
        } catch (CmsException e) {
            m_priority = 0;
            m_title = "";
            return;
        }

        try {
            m_priority = Integer.parseInt(
                CmsProperty.get(CmsPriorityResourceCollector.PROPERTY_PRIORITY, properties).getValue());
        } catch (NumberFormatException e) {
            m_priority = CmsPriorityResourceCollector.PRIORITY_STANDARD;
        }

        m_title = CmsProperty.get(CmsPropertyDefinition.PROPERTY_TITLE, properties).getValue();
        if (CmsStringUtil.isEmpty(m_title)) {
            m_title = "";
        }
    }