📄 abstractclusterstore.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.//// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -