Set KDR (Key Definition Rate)

@param keyDefinitionRate
New key definition rate is 2^aKDR, and maximum is 64 (2^64)
@return true if successfully set, false for invalid KDR values
179032
public boolean setKDR(int keyDefinitionRate) {
		boolean res = true;
		if ((keyDefinitionRate > 64) || (keyDefinitionRate <= 0)) {
			log("setKDR() - invalid parameter " + keyDefinitionRate);
			res = false;
		} else {
			kdr = keyDefinitionRate;
		}
		return res;
	}
1205044
public function initialise(cache_definition $definition) {
        $keyarray = $definition->generate_multi_key_parts();
        $this->storeid = $keyarray['mode'].'/'.$keyarray['component'].'/'.$keyarray['area'].'/'.$keyarray['siteidentifier'];
        $this->store = &self::register_store_id($this->storeid);
        $maxsize = $definition->get_maxsize();
        $this->simpledata = $definition->uses_simple_data();
        $this->igbinaryfound = extension_loaded('igbinary');
        if ($maxsize !== null) {
            // Must be a positive int.
            $this->maxsize = abs((int)$maxsize);
            $this->storecount = count($this->store);
        }
    }
643189
private ApplicationDefinition checkApplicationKey(ApplicationDefinition appDef) {
        Tenant tenant = Tenant.getTenant(appDef);
        ApplicationDefinition currAppDef = getApplication(tenant, appDef.getAppName());
        if (currAppDef == null) {
            m_logger.info("Defining application: {}", appDef.getAppName());
        } else {
            m_logger.info("Updating application: {}", appDef.getAppName());
            String appKey = currAppDef.getKey();
            Utils.require(Utils.isEmpty(appKey) || appKey.equals(appDef.getKey()),
                          "Application key cannot be changed: %s", appDef.getKey());
        }
        return currAppDef;
    }
612228
protected function define(ClassDefinition $class)
    {
        $class->property($this->key)->asString();

        $class->property($this->value)->asMixed();
    }
561137
func (s *DescribeStateMachineForExecutionOutput) SetDefinition(v string) *DescribeStateMachineForExecutionOutput {
	s.Definition = &v
	return s
}
89550
public static com.liferay.commerce.product.model.CPDefinition createCPDefinition(
		long CPDefinitionId) {
		return getService().createCPDefinition(CPDefinitionId);
	}
595392
public static boolean isInitialAckDRId(long drId) {
        if (drId == -1) return true;
        int clusterId = getClusterIdFromDRId(drId);
        if (clusterId >= 0 && clusterId <= MAX_CLUSTER_ID) {
            return ((drId >>> 63) != 1L) && (getSequenceNumberFromDRId(drId) == MAX_SEQUENCE_NUMBER);
        }
        return false;
    }
253778
protected void setTTEClassDefinition(String tteClass, Identification id, Attributes attr) {
	this.tteCD = ClassDefinitionImpl.toClassDefinition(tteClass, id, attr);
    }
1002051
func (s *DescribeStateMachineOutput) SetDefinition(v string) *DescribeStateMachineOutput {
	s.Definition = &v
	return s
}
55102
public void setCPDefinitionLinkLocalService(
		com.liferay.commerce.product.service.CPDefinitionLinkLocalService cpDefinitionLinkLocalService) {
		this.cpDefinitionLinkLocalService = cpDefinitionLinkLocalService;
	}
641767
@Override
	public void cacheResult(CPDefinition cpDefinition) {
		entityCache.putResult(CPDefinitionModelImpl.ENTITY_CACHE_ENABLED,
			CPDefinitionImpl.class, cpDefinition.getPrimaryKey(), cpDefinition);

		finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G,
			new Object[] { cpDefinition.getUuid(), cpDefinition.getGroupId() },
			cpDefinition);

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_ERC,
			new Object[] {
				cpDefinition.getCompanyId(),
				cpDefinition.getExternalReferenceCode()
			}, cpDefinition);

		cpDefinition.resetOriginalValues();
	}
1059593
public int getRepeatRate (int keyCode)
    {
        KeyRecord krec = _keys.get(keyCode);
        return (krec == null) ? DEFAULT_REPEAT_RATE : krec.repeatRate;
    }
711730
func (s *CreateStateMachineInput) SetDefinition(v string) *CreateStateMachineInput {
	s.Definition = &v
	return s
}
1094127
@Override
	public void removeByCPDefinitionId(long CPDefinitionId) {
		for (CPDefinitionLink cpDefinitionLink : findByCPDefinitionId(
				CPDefinitionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpDefinitionLink);
		}
	}
922642
private function isClassCacheable($classDefinition)
    {
        if ($classDefinition instanceof ClassDefinition) {
            return true;
        }
        if ($classDefinition instanceof \ReflectionClass) {
            if ($classDefinition->isInternal() && $classDefinition->isInstantiable()) {
                $extension = $classDefinition->getExtension();
                switch ($extension->getName()) {
                    case 'Reflection':
                    case 'Core':
                    case 'SPL':
                        return true;
                }
            }
        }

        return false;
    }
921537
@Override
	@Transactional(enabled = false)
	public CPDefinition createCPDefinition(long CPDefinitionId) {
		return cpDefinitionPersistence.create(CPDefinitionId);
	}
1177829
@Override
	public void cacheResult(List<CPDefinitionLink> cpDefinitionLinks) {
		for (CPDefinitionLink cpDefinitionLink : cpDefinitionLinks) {
			if (entityCache.getResult(
						CPDefinitionLinkModelImpl.ENTITY_CACHE_ENABLED,
						CPDefinitionLinkImpl.class,
						cpDefinitionLink.getPrimaryKey()) == null) {
				cacheResult(cpDefinitionLink);
			}
			else {
				cpDefinitionLink.resetOriginalValues();
			}
		}
	}