java.util.concurrent.atomic.AtomicLong#longValue()源码实例Demo

下面列出了java.util.concurrent.atomic.AtomicLong#longValue() 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: QLExpress   文件: QLPattern.java
public static QLMatchResult findMatchStatement(INodeTypeManager aManager,QLPatternNode pattern ,List<? extends IDataNode> nodes,int point) throws Exception{
	AtomicLong maxMatchPoint = new AtomicLong();
	AtomicLong maxDeep = new AtomicLong(1);
	QLMatchResultCache resultCache =new QLMatchResultCache(5);
	ArrayListCache<QLMatchResultTree> arrayListCache = new ArrayListCache<QLMatchResultTree>(50);
       MatchParamsPack staticParams = new MatchParamsPack(aManager, nodes, maxDeep, maxMatchPoint,resultCache,arrayListCache);
	QLMatchResult result  = findMatchStatementWithAddRootOptimizeStack(staticParams, pattern, point, true, 1);
	if(printStackDepth) {
           log.warn("递归堆栈深度:" + maxDeep.longValue() + "  重用QLMatchResult次数:" + resultCache.fetchCount
				+ "  新建QLMatchResult次数:" + resultCache.newCount + "  新建ArrayList数量:" + arrayListCache.newCount);

       }
	if(result == null || result.getMatchSize() == 0){
		throw new QLCompileException("程序错误,不满足语法规范,没有匹配到合适的语法,最大匹配致[0:" + (maxMatchPoint.longValue()-1) +"]");
	}else if(result != null && result.getMatchSize() != 1){
		throw new QLCompileException("程序错误,不满足语法规范,必须有一个根节点:" + pattern + ",最大匹配致[0:" + (maxMatchPoint.longValue()-1) +"]");
	}
	return result;
}
 
源代码2 项目: leafserver   文件: LeafServerUtils.java
/**
 * get next id when segment have it
 *
 * @param segment
 * @return nextId
 */
public static Long getSegmentId(Segment segment) {
    AtomicLong current = segment.getLongFactory();
    if (current.longValue() <= segment.getMax()) {
        return current.getAndIncrement();
    }

    segment.setInitCompleted(false);//to false

    return null;
}
 
源代码3 项目: takari-smart-builder   文件: ProjectComparator.java
private static <K> Long getServiceTime(Map<String, AtomicLong> serviceTimes, K project,
    long defaultServiceTime, Function<K, String> toKey) {
  AtomicLong serviceTime = serviceTimes.get(toKey.apply(project));
  return serviceTime != null ? serviceTime.longValue() : defaultServiceTime;
}
 
源代码4 项目: sarl   文件: AtomicLongArithmeticExtensions.java
/** The binary {@code plus} operator. This is the equivalent to
 * the Java {@code +} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left+right}
 */
@Pure
@Inline(value = "($1.longValue() + $2)", constantExpression = true)
public static long operator_plus(AtomicLong left, int right) {
	return left.longValue() + right;
}
 
源代码5 项目: sarl   文件: PrimitiveFloatArithmeticExtensions.java
/** The binary {@code minus} operator. This is the equivalent to
 * the Java {@code -} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left-right}
 */
@Pure
@Inline(value = "($1 - $2.longValue())", constantExpression = true)
public static float operator_minus(float left, AtomicLong right) {
	return left - right.longValue();
}
 
源代码6 项目: sarl   文件: AtomicLongArithmeticExtensions.java
/** The binary {@code minus} operator. This is the equivalent to
 * the Java {@code -} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left-right}
 */
@Pure
@Inline(value = "($1.longValue() - $2)", constantExpression = true)
public static long operator_minus(AtomicLong left, byte right) {
	return left.longValue() - right;
}
 
源代码7 项目: sarl   文件: AtomicLongArithmeticExtensions.java
/** The binary {@code multiply} operator. This is the equivalent to
 * the Java {@code *} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left*right}
 */
@Pure
@Inline(value = "($1.longValue() * $2.longValue())", constantExpression = true)
public static long operator_multiply(AtomicLong left, AtomicLong right) {
	return left.longValue() * right.longValue();
}
 
源代码8 项目: sarl   文件: AtomicLongArithmeticExtensions.java
/** The binary {@code divide} operator. This is the equivalent to
 * the Java {@code /} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left/right}
 */
@Pure
@Inline(value = "($1.longValue() / $2.intValue())", constantExpression = true)
public static long operator_divide(AtomicLong left, AtomicInteger right) {
	return left.longValue() / right.intValue();
}
 
源代码9 项目: sarl   文件: PrimitiveIntArithmeticExtensions.java
/** The binary {@code divide} operator. This is the equivalent to
 * the Java {@code /} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left/right}
 */
@Pure
@Inline(value = "($1 / $2.longValue())", constantExpression = true)
public static long operator_divide(int left, AtomicLong right) {
	return left / right.longValue();
}
 
源代码10 项目: sarl   文件: LongArithmeticExtensions.java
/** The binary {@code modulo} operator. This is the equivalent to
 * the Java {@code %} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left%right}
 */
@Pure
@Inline(value = "($1.longValue() % $2.longValue())", constantExpression = true)
public static long operator_modulo(Long left, AtomicLong right) {
	return left.longValue() % right.longValue();
}
 
源代码11 项目: sarl   文件: AtomicLongArithmeticExtensions.java
/** The binary {@code multiply} operator. This is the equivalent to
 * the Java {@code *} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left*right}
 */
@Pure
@Inline(value = "($1.longValue() * $2)", constantExpression = true)
public static long operator_multiply(AtomicLong left, long right) {
	return left.longValue() * right;
}
 
源代码12 项目: sarl   文件: AtomicLongArithmeticExtensions.java
/** The binary {@code multiply} operator. This is the equivalent to
 * the Java {@code *} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left*right}
 */
@Pure
@Inline(value = "($1.longValue() * $2)", constantExpression = true)
public static long operator_multiply(AtomicLong left, short right) {
	return left.longValue() * right;
}
 
源代码13 项目: sarl   文件: AtomicLongArithmeticExtensions.java
/** The binary {@code modulo} operator. This is the equivalent to
 * the Java {@code %} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left%right}
 */
@Pure
@Inline(value = "($1.longValue() % $2.longValue())", constantExpression = true)
public static long operator_modulo(AtomicLong left, Long right) {
	return left.longValue() % right.longValue();
}
 
源代码14 项目: sarl   文件: ShortArithmeticExtensions.java
/** The binary {@code divide} operator. This is the equivalent to
 * the Java {@code /} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left/right}
 */
@Pure
@Inline(value = "($1.shortValue() / $2.longValue())", constantExpression = true)
public static long operator_divide(Short left, AtomicLong right) {
	return left.shortValue() / right.longValue();
}
 
源代码15 项目: sarl   文件: LongArithmeticExtensions.java
/** The binary {@code plus} operator. This is the equivalent to
 * the Java {@code +} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left+right}
 */
@Pure
@Inline(value = "($1.longValue() + $2.longValue())", constantExpression = true)
public static long operator_plus(Long left, AtomicLong right) {
	return left.longValue() + right.longValue();
}
 
源代码16 项目: sarl   文件: AtomicLongComparisonExtensions.java
/** The binary {@code greaterEqualsThan} operator. This is the equivalent
 * to the Java {@code &gt;=} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left&gt;=right}
 */
@Pure
@Inline(value = "($1.longValue() >= $2)", constantExpression = true)
public static boolean operator_greaterEqualsThan(AtomicLong left, short right) {
	return left.longValue() >= right;
}
 
源代码17 项目: sarl   文件: ByteArithmeticExtensions.java
/** The binary {@code minus} operator. This is the equivalent to
 * the Java {@code -} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left-right}
 */
@Pure
@Inline(value = "($1.byteValue() - $2.longValue())", constantExpression = true)
public static long operator_minus(Byte left, AtomicLong right) {
	return left.byteValue() - right.longValue();
}
 
源代码18 项目: sarl   文件: AtomicLongArithmeticExtensions.java
/** The binary {@code minus} operator. This is the equivalent to
 * the Java {@code -} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left-right}
 */
@Pure
@Inline(value = "($1.longValue() - $2)", constantExpression = true)
public static double operator_minus(AtomicLong left, double right) {
	return left.longValue() - right;
}
 
源代码19 项目: sarl   文件: AtomicLongComparisonExtensions.java
/** The binary {@code greaterEqualsThan} operator. This is the equivalent
 * to the Java {@code &gt;=} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left&gt;=right}
 */
@Pure
@Inline(value = "($1.longValue() >= $2)", constantExpression = true)
public static boolean operator_greaterEqualsThan(AtomicLong left, byte right) {
	return left.longValue() >= right;
}
 
源代码20 项目: sarl   文件: AtomicLongComparisonExtensions.java
/** The binary {@code greaterEqualsThan} operator. This is the equivalent
 * to the Java {@code &gt;=} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left&gt;=right}
 */
@Pure
@Inline(value = "($1.longValue() >= $2)", constantExpression = true)
public static boolean operator_greaterEqualsThan(AtomicLong left, int right) {
	return left.longValue() >= right;
}