abstractclusterstore.java
来自「Java的面向对象数据库系统的源代码」· Java 代码 · 共 55 行
JAVA
55 行
// You can redistribute this software and/or modify it under the terms of// the Ozone Library License version 1 published by ozone-db.org.//// This file is// Copyright (C) 2003-@year@ Per Nyfelt. All rights reserved.//package org.ozoneDB.core.storage;import org.ozoneDB.core.Env;import org.ozoneDB.core.Transaction;import org.ozoneDB.core.Permissions;import java.io.IOException;/** * @author Per Nyfelt */public abstract class AbstractClusterStore { public final static String POSTFIX_SEPARATOR = "."; public final static String POSTFIX_CLUSTER = ".cl"; public final static String POSTFIX_LOCK = ".lk"; public final static String POSTFIX_TEMP = ".tm"; public transient long touchCount; protected transient Env env; public AbstractClusterStore(Env _env) { this.env = _env; } public String basename(ClusterID cid) { StringBuffer filename = new StringBuffer(env.getDatabaseDir()); filename.append(Env.DATA_DIR); // filename.append (File.separator); filename.append(cid.value()); return filename.toString(); } public abstract int currentBytesPerContainer(); public abstract void registerContainerAndLock(StorageObjectContainer container, Permissions perms, Transaction locker, int lockLevel) throws Exception; protected abstract void activateCluster(Cluster cluster, int size); protected abstract void deactivateCluster(Cluster cluster) throws IOException; protected abstract void prepareCommitCluster(Transaction ta, ClusterID cid) throws IOException, ClassNotFoundException; protected abstract void commitCluster(Transaction ta, ClusterID cid) throws IOException, ClassNotFoundException ; protected abstract void abortCluster(Transaction ta, ClusterID cid) throws IOException, ClassNotFoundException;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?