Tabnine Logo
Long.getLong
Code IndexAdd Tabnine to your IDE (free)

How to use
getLong
method
in
java.lang.Long

Best Java code snippets using java.lang.Long.getLong (Showing top 20 results out of 1,008)

origin: springside/springside4

/**
 * 读取Long类型的系统变量,为空时返回null.
 */
public static Long getLong(String name) {
  return Long.getLong(name);
}
origin: springside/springside4

/**
 * 读取Integer类型的系统变量,为空时返回默认值
 */
public static Long getLong(String name, Long defaultValue) {
  return Long.getLong(name, defaultValue);
}
origin: real-logic/aeron

/**
 * Maximum number of catalog entries to allocate for the catalog file.
 *
 * @return the maximum number of catalog entries to support for the catalog file.
 */
public static long maxCatalogEntries()
{
  return Long.getLong(MAX_CATALOG_ENTRIES_PROP_NAME, MAX_CATALOG_ENTRIES_DEFAULT);
}
origin: PipelineAI/pipeline

@Override
public Long get() {
  return Long.getLong(name, fallback);
}

origin: OpenHFT/Chronicle-Queue

/**
 * @return epoch offset as the number of number of milliseconds since January 1, 1970,  00:00:00
 * GMT
 */
public long epoch() {
  return epoch == null ? Long.getLong(DEFAULT_EPOCH_PROPERTY, 0L) : epoch;
}
origin: neo4j/neo4j

/**
 * Get the value of a {@code long} system property.
 *
 * The absolute name of the system property is computed based on the provided class and local name.
 *
 * @param location the class that owns the flag.
 * @param name the local name of the flag.
 * @param defaultValue the default value of the flag if the system property is not assigned.
 * @return the parsed value of the system property, or the default value.
 */
public static long getLong( Class<?> location, String name, long defaultValue )
{
  return Long.getLong( name( location, name ), defaultValue );
}
origin: apache/zookeeper

@Override
public void start() {
  int numCores = Runtime.getRuntime().availableProcessors();
  int numWorkerThreads = Integer.getInteger(
    ZOOKEEPER_COMMIT_PROC_NUM_WORKER_THREADS, numCores);
  workerShutdownTimeoutMS = Long.getLong(
    ZOOKEEPER_COMMIT_PROC_SHUTDOWN_TIMEOUT, 5000);
  LOG.info("Configuring CommitProcessor with "
       + (numWorkerThreads > 0 ? numWorkerThreads : "no")
       + " worker threads.");
  if (workerPool == null) {
    workerPool = new WorkerService(
      "CommitProcWork", numWorkerThreads, true);
  }
  stopped = false;
  stoppedMainLoop = false;
  super.start();
}
origin: apache/zookeeper

workerShutdownTimeoutMS = Long.getLong(
  ZOOKEEPER_NIO_SHUTDOWN_TIMEOUT, 5000);
origin: apache/geode

/**
 *
 * Constructor.
 *
 * @param cache The GemFire <code>Cache</code>
 * @param maximumTimeBetweenPings The maximum time allowed between pings before determining the
 */
private ClientHealthMonitor(InternalCache cache, int maximumTimeBetweenPings,
  CacheClientNotifierStats stats) {
 // Set the Cache
 this._cache = cache;
 this.maximumTimeBetweenPings = maximumTimeBetweenPings;
 this.monitorInterval = Long.getLong(CLIENT_HEALTH_MONITOR_INTERVAL_PROPERTY,
   DEFAULT_CLIENT_MONITOR_INTERVAL_IN_MILLIS);
 logger.debug("Setting monitorInterval to {}", this.monitorInterval);
 if (maximumTimeBetweenPings > 0) {
  if (logger.isDebugEnabled()) {
   logger.debug("{}: Initializing client health monitor thread", this);
  }
  this._clientMonitor = new ClientHealthMonitorThread(maximumTimeBetweenPings);
  this._clientMonitor.start();
 } else {
  // LOG:CONFIG: changed from config to info
  logger.info(
    "Client health monitor thread disabled due to maximumTimeBetweenPings setting: {}",
    maximumTimeBetweenPings);
  this._clientMonitor = null;
 }
 this.stats = stats;
}
origin: apache/ignite

/**
 * Helper method for getting long property.
 *
 * @param name Property name.
 * @return JVM property value or environment variable value if
 *         JVM property is undefined. Returns {@code null} if
 *         both JVM property and environment variable are not set.
 */
@Nullable private static Long getLongProperty0(String name) {
  Long ret = Long.getLong(name);
  if (ret == null) {
    String env = System.getenv(name);
    ret = env != null ? Long.valueOf(env) : null;
  }
  return ret;
}
origin: apache/geode

/**
 * Initialize the EventTracker's timer task. This is stored for tracking and shutdown purposes
 */
private EventTrackerExpiryTask createEventTrackerExpiryTask() {
 long lifetimeInMillis =
   Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "messageTrackingTimeout",
     PoolFactory.DEFAULT_SUBSCRIPTION_MESSAGE_TRACKING_TIMEOUT / 3);
 EventTrackerExpiryTask task = new EventTrackerExpiryTask(lifetimeInMillis);
 getCCPTimer().scheduleAtFixedRate(task, lifetimeInMillis, lifetimeInMillis);
 return task;
}
origin: apache/geode

/**
 * Returns a random number generator
 */
private Random getRandom() {
 long seed = Long.getLong("SEED", System.currentTimeMillis()).longValue();
 System.out.println("SEED for " + this.testName.getMethodName() + ": " + seed);
 return new Random(seed);
}
origin: apache/geode

/**
 * Gets the timeout value as a {@link Duration}.
 *
 * <p>
 * One use of this is with {@link Mockito#timeout(long)}:
 *
 * <pre>
 * import static org.apache.geode.test.awaitility.GeodeAwaitility.getTimeout;
 *
 * private static final long TIMEOUT = getTimeout().getValueInMS();
 *
 * {@literal @}Test
 * public void test() {
 * ...
 * ArgumentCaptor<AlertDetails> alertDetailsCaptor = ArgumentCaptor.forClass(AlertDetails.class);
 * verify(messageListener, timeout(TIMEOUT)).created(alertDetailsCaptor.capture());
 * }
 *
 * <pre>
 *
 * @return the current timeout value as a {@code Duration}
 */
public static Duration getTimeout() {
 return new Duration(getLong(TIMEOUT_SECONDS_PROPERTY, DEFAULT_TIMEOUT.getValue()), SECONDS);
}
origin: apache/geode

@Override
public void start(InternalPool pool) {
 this.pool = pool;
 pool.getStats().setInitialContacts(((LocatorList) locators.get()).size());
 this.locatorUpdateInterval = Long.getLong(
   DistributionConfig.GEMFIRE_PREFIX + "LOCATOR_UPDATE_INTERVAL", pool.getPingInterval());
 if (locatorUpdateInterval > 0) {
  pool.getBackgroundProcessor().scheduleWithFixedDelay(new UpdateLocatorListTask(), 0,
    locatorUpdateInterval, TimeUnit.MILLISECONDS);
  logger.info("AutoConnectionSource UpdateLocatorListTask started with interval={} ms.",
    new Object[] {this.locatorUpdateInterval});
 }
}
origin: apache/geode

/**
 * This method was split out from getPrimary() due to bug #40639 and is only intended to be called
 * from within that method.
 *
 * @see #getPrimary()
 * @return the new primary
 */
private InternalDistributedMember waitForNewPrimary() {
 DistributionManager dm = this.regionAdvisor.getDistributionManager();
 DistributionConfig config = dm.getConfig();
 // failure detection period
 long timeout = config.getMemberTimeout() * 3L;
 // plus time for a new member to become primary
 timeout += Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "BucketAdvisor.getPrimaryTimeout",
   15000L);
 InternalDistributedMember newPrimary = waitForPrimaryMember(timeout);
 return newPrimary;
}
origin: apache/geode

joinTimeout = Long.getLong("p2p.joinTimeout", defaultJoinTimeout).longValue();
origin: apache/ignite

public static final long UNWIND_THROTTLING_TIMEOUT = Long.getLong(
  IgniteSystemProperties.IGNITE_UNWIND_THROTTLING_TIMEOUT, 500L);
origin: apache/geode

  Long.getLong(KEY_SLOW_START_TIME_FOR_TESTING, DEFAULT_SLOW_STARTING_TIME).longValue();
long elapsedTime = 0;
long startTime = System.currentTimeMillis();
origin: mulesoft/mule

private void acquireContextDisposeDelay() {
 disposeDelayInMillis = Long.getLong(MULE_LOG_CONTEXT_DISPOSE_DELAY_MILLIS, DEFAULT_DISPOSE_DELAY_IN_MILLIS);
}
origin: com.atlassian.jira/jira-api

@Override
public Long getLong(@Nonnull final String key)
{
  return Long.getLong(key);
}
java.langLonggetLong

Javadoc

Returns the Long value of the system property identified by string. Returns null if string is nullor empty, if the property can not be found or if its value can not be parsed as a long.

Popular methods of Long

  • parseLong
    Parses the string argument as a signed long in the radix specified by the second argument. The chara
  • toString
    Returns a string representation of the first argument in the radix specified by the second argument.
  • valueOf
    Returns a Long object holding the value extracted from the specified String when parsed with the rad
  • longValue
    Returns the value of this Long as a long value.
  • <init>
    Constructs a newly allocated Long object that represents the long value indicated by the String para
  • intValue
    Returns the value of this Long as an int.
  • equals
    Compares this object to the specified object. The result is true if and only if the argument is not
  • hashCode
  • toHexString
    Returns a string representation of the longargument as an unsigned integer in base 16.The unsigned l
  • compareTo
    Compares this Long object to another object. If the object is a Long, this function behaves likecomp
  • compare
    Compares two long values numerically. The value returned is identical to what would be returned by:
  • doubleValue
    Returns the value of this Long as a double.
  • compare,
  • doubleValue,
  • decode,
  • numberOfLeadingZeros,
  • numberOfTrailingZeros,
  • bitCount,
  • signum,
  • reverseBytes,
  • toBinaryString,
  • shortValue

Popular in Java

  • Making http requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • setContentView (Activity)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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