本文整理汇总了Java中net.caseif.flint.exception.rollback.RollbackException类的典型用法代码示例。如果您正苦于以下问题:Java RollbackException类的具体用法?Java RollbackException怎么用?Java RollbackException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RollbackException类属于net.caseif.flint.exception.rollback包,在下文中一共展示了RollbackException类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: markForRollback
import net.caseif.flint.exception.rollback.RollbackException; //导入依赖的package包/类
@Override
public void markForRollback(Location3D location)
throws IllegalArgumentException, RollbackException, OrphanedComponentException {
checkState();
checkArgument(location.getWorld().equals(getWorld()),
"Cannot roll back block change in separate world from arena");
try {
((InfernoRollbackAgent) getRollbackAgent())
.logBlockChange(WorldLocationConverter.of(location).createSnapshot());
} catch (IOException | SQLException ex) {
throw new RollbackException(ex);
}
}
示例2: markForRollback
import net.caseif.flint.exception.rollback.RollbackException; //导入依赖的package包/类
@Override
public void markForRollback(Location3D location) throws IllegalArgumentException, RollbackException {
checkArgument(getBoundary().contains(location),
"Cannot mark block for rollback in arena " + getId() + " - not within boundary");
try {
Location loc = LocationHelper.convertLocation(location);
getRollbackAgent().logBlockChange(loc, loc.getBlock().getState());
} catch (IOException | SQLException ex) {
throw new RollbackException(ex);
}
}
示例3: markForRollback
import net.caseif.flint.exception.rollback.RollbackException; //导入依赖的package包/类
/**
* Explicitly marks a location for rollback. When the arena is rolled back,
* the location will be reset to its state upon this method being invoked.
*
* <p>Note: This will have no effect if a rollback record already exists at
* the location.</p>
*
* @param location The {@link Location3D} to mark for rollback
* @throws IllegalArgumentException If the provided location is not
* contained by this {@link Arena}'s {@link Boundary}
* @throws RollbackException If an exception occurs while marking the
* location for rollback
* @throws OrphanedComponentException If this object is orphaned (see
* {@link Component} for details)
* @since 1.1
*/
void markForRollback(Location3D location) throws IllegalArgumentException, RollbackException,
OrphanedComponentException;