当前位置: 首页>>代码示例>>Java>>正文


Java Transaction.getState方法代码示例

本文整理汇总了Java中org.geotools.data.Transaction.getState方法的典型用法代码示例。如果您正苦于以下问题:Java Transaction.getState方法的具体用法?Java Transaction.getState怎么用?Java Transaction.getState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.geotools.data.Transaction的用法示例。


在下文中一共展示了Transaction.getState方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: unlock

import org.geotools.data.Transaction; //导入方法依赖的package包/类
private void unlock(
		Transaction transaction,
		String featureID,
		Set<String> authorizations,
		long expiryInMinutes ) {
	AuthorizedLock lock = transaction == Transaction.AUTO_COMMIT ? null : (AuthorizedLock) transaction
			.getState(this);
	if (lock == null) {
		lock = new AuthorizedLock(
				this,
				authorizations,
				expiryInMinutes);
		if (transaction != Transaction.AUTO_COMMIT) transaction.putState(
				this,
				lock);
	}
	unlock(
			lock,
			featureID);
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:21,代码来源:AbstractLockingManagement.java

示例2: getMyTransactionState

import org.geotools.data.Transaction; //导入方法依赖的package包/类
/**
 * Used to retrieve the TransactionStateDiff for this transaction.
 * <p>
 * 
 * @param transaction
 * @return GeoWaveTransactionState or null if subclass is handling
 *         differences
 * @throws IOException
 */
protected GeoWaveTransactionState getMyTransactionState(
		final Transaction transaction,
		final GeoWaveFeatureSource source )
		throws IOException {
	synchronized (transaction) {
		GeoWaveTransactionState state = null;
		if (transaction == Transaction.AUTO_COMMIT) {
			state = new GeoWaveAutoCommitTransactionState(
					source);
		}
		else {
			state = (GeoWaveTransactionState) transaction.getState(this);
			if (state == null) {
				state = new GeoWaveTransactionManagementState(
						transactionBufferSize,
						source.getComponents(),
						transaction,
						(LockingManagement) lockingManager);
				transaction.putState(
						this,
						state);
			}
		}
		return state;
	}
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:36,代码来源:GeoWaveGTDataStore.java

示例3: release

import org.geotools.data.Transaction; //导入方法依赖的package包/类
@Override
public boolean release(
		String authID,
		Transaction transaction )
		throws IOException {
	AuthorizedLock lock = transaction == Transaction.AUTO_COMMIT ? null : (AuthorizedLock) transaction
			.getState(this);
	if (lock == null) lock = new AuthorizedLock(
			this,
			authID,
			1 /* minutes */);
	releaseAll(lock);
	return true;
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:15,代码来源:AbstractLockingManagement.java

示例4: refresh

import org.geotools.data.Transaction; //导入方法依赖的package包/类
@Override
public boolean refresh(
		String authID,
		Transaction transaction )
		throws IOException {
	AuthorizedLock lock = transaction == Transaction.AUTO_COMMIT ? null : (AuthorizedLock) transaction
			.getState(this);
	if (lock == null) lock = new AuthorizedLock(
			this,
			authID,
			1 /* minutes */);
	resetAll(lock);
	return true;
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:15,代码来源:AbstractLockingManagement.java


注:本文中的org.geotools.data.Transaction.getState方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。