List of usage examples for java.lang Long MAX_VALUE
long MAX_VALUE
To view the source code for java.lang Long MAX_VALUE.
Click Source Link
From source file:mitm.common.util.ProcessUtils.java
public static String executeCommand(List<String> cmd, long timeout, InputStream input) throws IOException { return executeCommand(cmd, timeout, Long.MAX_VALUE, input); }
From source file:com.cloudera.oryx.ml.param.ContinuousAround.java
/** * @return {@code Long.MIN_VALUE} */ @Override public long getNumDistinctValues() { return Long.MAX_VALUE; }
From source file:ch.petikoch.examples.mvvm_rxjava.TestingClock.java
public void awaitTime(long time) { try {//from ww w .j a v a 2 s . c om awaitTime(time, Long.MAX_VALUE); } catch (TimeoutException e) { throw Throwables.propagate(e); } }
From source file:com.alibaba.rocketmq.tools.command.message.QueryMsgByKeySubCommand.java
void queryByKey(final DefaultMQAdminExt admin, final String topic, final String key) throws MQClientException, InterruptedException { admin.start();/*from w ww. j a va2s. c o m*/ QueryResult queryResult = admin.queryMessage(topic, key, 64, 0, Long.MAX_VALUE); System.out.printf("%-50s %4s %40s\n", // "#Message ID", // "#QID", // "#Offset"); for (MessageExt msg : queryResult.getMessageList()) { System.out.printf("%-50s %4d %40d\n", msg.getMsgId(), msg.getQueueId(), msg.getQueueOffset()); } }
From source file:com.aol.advertising.qiao.util.cache.PersistentValueWrapper.java
private long expirationTime() { if (timeout > 0) return lastAccessTime + timeout; else//from w ww. j a v a 2 s. c o m return Long.MAX_VALUE; }
From source file:net.minecrell.serverlistplus.canary.SnakeYAML.java
@SneakyThrows public static void load(Plugin plugin) { try { // Check if it is already loaded Class.forName("org.yaml.snakeyaml.Yaml"); return;// www. j a v a2 s . c o m } catch (ClassNotFoundException ignored) { } Path path = Paths.get("lib", SNAKE_YAML_JAR); if (Files.notExists(path)) { Files.createDirectories(path.getParent()); plugin.getLogman().info("Downloading SnakeYAML..."); URL url = new URL(SNAKE_YAML); MessageDigest sha1 = MessageDigest.getInstance("SHA-1"); try (ReadableByteChannel source = Channels.newChannel(new DigestInputStream(url.openStream(), sha1)); FileChannel out = FileChannel.open(path, StandardOpenOption.CREATE_NEW, StandardOpenOption.WRITE)) { out.transferFrom(source, 0, Long.MAX_VALUE); } if (!new String(Hex.encodeHex(sha1.digest())).equals(EXPECTED_HASH)) { Files.delete(path); throw new IllegalStateException( "Downloaded SnakeYAML, but checksum check failed. Please try again later."); } plugin.getLogman().info("Successfully downloaded!"); } loadJAR(path); }
From source file:com.p5solutions.core.utils.NumberUtils.java
public static boolean isLong(String value) { if (isNatural(value)) { Long v = NumberUtils.valueOf(value.toString(), Long.class); if (v >= Long.MIN_VALUE && v <= Long.MAX_VALUE) { return true; }//from www .j a v a 2s . c o m } return false; }
From source file:info.archinnov.achilles.test.integration.tests.bugs.LoadAllValuesAtOnceForClusteredCountersIT.java
@Test public void should_persist_and_find() throws Exception { long counterValue = RandomUtils.nextLong(0, Long.MAX_VALUE); long versionValue = RandomUtils.nextLong(0, Long.MAX_VALUE); compoundKey = new CompoundPK(RandomUtils.nextLong(0, Long.MAX_VALUE), "name"); entity = new ClusteredEntityWithCounter(compoundKey, incr(counterValue), incr(versionValue)); manager.insert(entity);//from www .j a va 2 s .com ClusteredEntityWithCounter found = manager.find(ClusteredEntityWithCounter.class, compoundKey); assertThat(found.getId()).isEqualTo(compoundKey); logAsserter.prepareLogLevel(AchillesLoggers.ACHILLES_DML_STATEMENT); assertThat(found.getCounter().get()).isEqualTo(counterValue); assertThat(found.getVersion().get()).isEqualTo(versionValue); logAsserter.assertNotContains("SELECT"); }
From source file:info.archinnov.achilles.test.integration.tests.bugs.ClusteredEntityWithTypeTransformerIT.java
@Test public void should_insert_and_find_entity_with_transformed_types() throws Exception { //Given/*from w w w .ja va 2 s . c o m*/ Long id = RandomUtils.nextLong(0, Long.MAX_VALUE); MyCount myCount = new MyCount(123); final ClusteredEntityWithTypeTransformer entity = new ClusteredEntityWithTypeTransformer(id, myCount, "val"); manager.insert(entity); //When final ClusteredEntityWithTypeTransformer found = manager.find(ClusteredEntityWithTypeTransformer.class, new ClusteredKey(id, myCount)); //Then assertThat(found.getId().getCount()).isEqualTo(myCount); assertThat(found.getValue()).isEqualTo("val"); }
From source file:com.thinkberg.webdav.data.DavCollection.java
protected boolean addQuotaProperty(Element root, boolean ignoreValue) { root.addElement(PROP_QUOTA).addText("" + Long.MAX_VALUE); return true;/*from w w w . j ava2 s. co m*/ }