threadtransactioncontext.java

来自「这个是perst-269.zip下面的SOURCECODE,和大家分享了。」· Java 代码 · 共 34 行

JAVA
34
字号
package org.garret.perst.impl;

import org.garret.perst.*;
import java.util.*;

/**
 * This class store transaction context associated with thread.
 * Content of this class is opaque for application, but it can use 
 * this context to share the single transaction between multiple threads
 */
public class ThreadTransactionContext { 
    static class Proxy { 
        Object obj;

        Proxy(Object o) { 
            obj = o;
        }

        public int hashCode() { 
            return System.identityHashCode(obj);
        }

        public boolean equals(Object o) { 
            return obj == o;
        }
    }

    int       nested;
    Hashtable locked = new Hashtable();
    ArrayList modified = new ArrayList();
    ArrayList deleted = new ArrayList();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?