本文整理汇总了Java中com.sleepycat.je.util.DbBackup类的典型用法代码示例。如果您正苦于以下问题:Java DbBackup类的具体用法?Java DbBackup怎么用?Java DbBackup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DbBackup类属于com.sleepycat.je.util包,在下文中一共展示了DbBackup类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Lease
import com.sleepycat.je.util.DbBackup; //导入依赖的package包/类
public Lease(int id, long duration, DbBackup dbbackup) {
super();
this.dbBackup = dbbackup;
this.id = id;
Lease oldLease = leases.put(id, this);
if (oldLease != null) {
throw EnvironmentFailureException.unexpectedState
("Found an old lease for node: " + id);
}
leaseTimer.schedule(this, duration);
}
示例2: terminate
import com.sleepycat.je.util.DbBackup; //导入依赖的package包/类
/**
* Fetches the leased DbBackup instance and terminates the lease.
*
* @return the dbBackup instance, if the lease hasn't already been
* terminated
*/
public synchronized DbBackup terminate() {
if (dbBackup == null) {
return null;
}
cancel();
Lease l = leases.remove(id);
assert(l == this);
DbBackup saveDbBackup = dbBackup;
dbBackup = null;
return saveDbBackup;
}
示例3: addDbBackup
import com.sleepycat.je.util.DbBackup; //导入依赖的package包/类
@Override
public boolean addDbBackup(DbBackup backup) {
synchronized (backups) {
if (backupProhibited) {
return false;
}
assert backups.add(backup);
}
super.addDbBackup(backup);
return true;
}
示例4: removeDbBackup
import com.sleepycat.je.util.DbBackup; //导入依赖的package包/类
@Override
public void removeDbBackup(DbBackup backup) {
synchronized (backups) {
assert backups.remove(backup);
}
super.removeDbBackup(backup);
}
示例5: invalidateBackups
import com.sleepycat.je.util.DbBackup; //导入依赖的package包/类
public void invalidateBackups(long fileNumber) {
synchronized (backups) {
for (DbBackup backup : backups) {
backup.invalidate(fileNumber);
}
}
}
示例6: enterBackupMode
import com.sleepycat.je.util.DbBackup; //导入依赖的package包/类
@Override
void enterBackupMode(boolean deleteOldLogFiles) throws Exception {
// FIXME: If user specifies to deleteOldLogFiles, then all log files
// that end with .del should be removed.
DbBackup backup = new DbBackup(mEnv);
backup.startBackup();
mBackup = backup;
}
示例7: exitBackupMode
import com.sleepycat.je.util.DbBackup; //导入依赖的package包/类
@Override
void exitBackupMode() throws Exception {
DbBackup backup = mBackup;
if (backup != null) {
try {
backup.endBackup();
} finally {
mBackup = null;
}
}
}
示例8: addDbBackup
import com.sleepycat.je.util.DbBackup; //导入依赖的package包/类
/**
* For replicated environments only; just return true for a standalone
* environment.
*/
public boolean addDbBackup(@SuppressWarnings("unused") DbBackup backup) {
incBackupCount();
return true;
}
示例9: getOpenDbBackup
import com.sleepycat.je.util.DbBackup; //导入依赖的package包/类
public synchronized DbBackup getOpenDbBackup() {
return (dbBackup != null) && dbBackup.backupIsOpen() ?
dbBackup :
null;
}
示例10: enterIncrementalBackupMode
import com.sleepycat.je.util.DbBackup; //导入依赖的package包/类
@Override
void enterIncrementalBackupMode(long lastLogNum, boolean deleteOldLogFiles) throws Exception {
DbBackup backup = new DbBackup(mEnv, lastLogNum);
backup.startBackup();
mBackup = backup;
}
示例11: removeDbBackup
import com.sleepycat.je.util.DbBackup; //导入依赖的package包/类
/**
* For replicated environments only; do nothing for a standalone
* environment.
*/
public void removeDbBackup(@SuppressWarnings("unused") DbBackup backup) {
decBackupCount();
}