📄 transactionexception.java
字号:
// You can redistribute this software and/or modify it under the terms of
// the Ozone Library License version 1 published by ozone-db.org.
//
// The original code and portions created by SMB are
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
//
// $Id: TransactionException.java,v 1.2 2002/12/29 11:15:55 per_nyfelt Exp $
package org.ozoneDB;
/**
* This exception is thrown, if...
*
*
* @author <a href="http://www.softwarebuero.de/">SMB</a>
* @version $Revision: 1.2 $Date: 2002/12/29 11:15:55 $
*/
public class TransactionException extends OzoneRemoteException {
public final static int UNKNOWN = 0;
/**
* Transaction had inproper status to complete the requested operation.
*/
public final static int STATE = 1;
/**
* Transaction was rolled back instead of prepared.
*/
public final static int ROLLBACK = 2;
/**
* An object that was optimisticly locked (by an explicit lock or the use of
* {@link ClientCacheDatabase}) was changed by another party.
*/
public final static int OPTIMISTIC = 3;
/**
* An error was encountered where it was not expected. This normaly
* indicates a runtime exception (for example an IOException) or a bug.
*/
public final static int UNEXPECTED = 4;
/**
* The transaction was stopped by the transaction manager.
*/
public final static int STOPPED = 5;
protected int code;
public TransactionException() {
}
public TransactionException( String s ) {
super( s );
code = UNKNOWN;
}
public TransactionException(String msg, Throwable cause) {
super(msg, cause);
}
public TransactionException(Throwable cause) {
super(cause);
}
public TransactionException( String s, int _code ) {
super( s );
code = _code;
}
public int code() {
return code;
}
public String toString() {
return super.toString() + " [code: " + code + "]";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -