All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jd.blockchain.transaction.ValueHolderWrapper Maven / Gradle / Ivy

There is a newer version: 1.6.5.RELEASE
Show newest version
package com.jd.blockchain.transaction;

class ValueHolderWrapper {
	private OperationResultHolder valueHolder;

	protected ValueHolderWrapper(OperationResultHolder valueHolder) {
		this.valueHolder = valueHolder;
	}

	public boolean isCompleted() {
		return valueHolder.isCompleted();
	}

	public Throwable getError() {
		return valueHolder.getError();
	}

	/**
	 * 获取值;
* * 此方法不堵塞,调用立即返回;
* * 如果未完成时( {@link #isCompleted()} 为 false ),总是返回 null; * * @return */ protected Object getValue() { return valueHolder.getResult(); } public void addCompletedListener(OperationCompletedListener listener) { valueHolder.addCompletedListener(listener); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy