congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
GlobalConfig.getNumberIdCacheSize
Code IndexAdd Tabnine to your IDE (free)

How to use
getNumberIdCacheSize
method
in
com.haulmont.cuba.core.global.GlobalConfig

Best Java code snippets using com.haulmont.cuba.core.global.GlobalConfig.getNumberIdCacheSize (Showing top 3 results out of 315)

origin: com.haulmont.cuba/cuba-global

protected boolean useIdCache() {
  return config.getNumberIdCacheSize() != 0 && cached;
}
origin: com.haulmont.cuba/cuba-global

  public synchronized long getNext() {
    if (!useIdCache()) {
      return numberIdSequence.createLongId(entityName, sequenceName);
    } else {
      long next = ++counter;
      if (next > sequenceValue + config.getNumberIdCacheSize()) {
        createCachedCounter();
        next = ++counter;
      }
      return next;
    }
  }
}
origin: com.haulmont.cuba/cuba-core

@Override
public Long createCachedLongId(String entityName, String sequenceName) {
  Sequence sequence = Sequence.withName(getSequenceName(entityName, sequenceName))
      .setStore(getDataStore(entityName))
      .setStartValue(0)
      .setIncrement(config.getNumberIdCacheSize());
  return sequences.createNextValue(sequence);
}
com.haulmont.cuba.core.globalGlobalConfiggetNumberIdCacheSize

Popular methods of GlobalConfig

  • getAvailableLocales
    Supported locales. List of locales is shown on user login.
  • getConfDir
  • getWebHostName
  • getWebPort
  • getWebAppUrl
  • getWebContextName
  • getLocaleSelectVisible
    Show locale select in LoginWindow.
  • getTempDir
  • getAllowQueryFromSelected
  • getDataDir
  • getHealthCheckResponse
  • getRestRequiresSecurityToken
  • getHealthCheckResponse,
  • getRestRequiresSecurityToken,
  • getTestMode,
  • getUserSessionLogEnabled,
  • getAnonymousSessionId,
  • getAppFolderEditWindowClassName,
  • getCubaClasspathDirectories,
  • getDeepCopyNonPersistentReferences,
  • getDisableEscapingLikeForDataStores

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now