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


Java RollbackException类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:caseif,项目名称:Inferno,代码行数:16,代码来源:InfernoArena.java

示例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);
    }
}
 
开发者ID:caseif,项目名称:Steel,代码行数:13,代码来源:SteelArena.java

示例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;
 
开发者ID:caseif,项目名称:Flint,代码行数:19,代码来源:Arena.java


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