|
|
@ -26,15 +26,18 @@ public class ReadOnlyTest { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void readOnlyOpen() throws RocksDBException { |
|
|
|
public void readOnlyOpen() throws RocksDBException { |
|
|
|
RocksDB db, db2, db3; |
|
|
|
RocksDB db = null; |
|
|
|
|
|
|
|
RocksDB db2 = null; |
|
|
|
|
|
|
|
RocksDB db3 = null; |
|
|
|
|
|
|
|
Options options = null; |
|
|
|
List<ColumnFamilyHandle> columnFamilyHandleList = |
|
|
|
List<ColumnFamilyHandle> columnFamilyHandleList = |
|
|
|
new ArrayList<>(); |
|
|
|
new ArrayList<>(); |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
new ArrayList<>(); |
|
|
|
new ArrayList<>(); |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList2 = |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList2 = |
|
|
|
new ArrayList<>(); |
|
|
|
new ArrayList<>(); |
|
|
|
|
|
|
|
try { |
|
|
|
Options options = new Options(); |
|
|
|
options = new Options(); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
|
|
|
|
|
|
|
|
db = RocksDB.open(options, |
|
|
|
db = RocksDB.open(options, |
|
|
@ -67,7 +70,6 @@ public class ReadOnlyTest { |
|
|
|
assertThat(db2.get("key2".getBytes())).isNull(); |
|
|
|
assertThat(db2.get("key2".getBytes())).isNull(); |
|
|
|
assertThat(db2.get(readOnlyColumnFamilyHandleList.get(0), "key2".getBytes())). |
|
|
|
assertThat(db2.get(readOnlyColumnFamilyHandleList.get(0), "key2".getBytes())). |
|
|
|
isNull(); |
|
|
|
isNull(); |
|
|
|
|
|
|
|
|
|
|
|
cfDescriptors.clear(); |
|
|
|
cfDescriptors.clear(); |
|
|
|
cfDescriptors.add( |
|
|
|
cfDescriptors.add( |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
@ -75,62 +77,105 @@ public class ReadOnlyTest { |
|
|
|
cfDescriptors.add( |
|
|
|
cfDescriptors.add( |
|
|
|
new ColumnFamilyDescriptor("new_cf2", new ColumnFamilyOptions())); |
|
|
|
new ColumnFamilyDescriptor("new_cf2", new ColumnFamilyOptions())); |
|
|
|
db3 = RocksDB.openReadOnly( |
|
|
|
db3 = RocksDB.openReadOnly( |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, readOnlyColumnFamilyHandleList2); |
|
|
|
readOnlyColumnFamilyHandleList2); |
|
|
|
|
|
|
|
assertThat(new String(db3.get(readOnlyColumnFamilyHandleList2.get(1), |
|
|
|
assertThat(new String(db3.get(readOnlyColumnFamilyHandleList2.get(1), |
|
|
|
"key2".getBytes()))).isEqualTo("value2"); |
|
|
|
"key2".getBytes()))).isEqualTo("value2"); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
if (db != null) { |
|
|
|
db.close(); |
|
|
|
db.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (db2 != null) { |
|
|
|
db2.close(); |
|
|
|
db2.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (db3 != null) { |
|
|
|
db3.close(); |
|
|
|
db3.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (options != null) { |
|
|
|
options.dispose(); |
|
|
|
options.dispose(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
public void failToWriteInReadOnly() throws RocksDBException { |
|
|
|
public void failToWriteInReadOnly() throws RocksDBException { |
|
|
|
|
|
|
|
RocksDB db = null; |
|
|
|
|
|
|
|
RocksDB rDb = null; |
|
|
|
|
|
|
|
Options options = null; |
|
|
|
|
|
|
|
try { |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
cfDescriptors.add( |
|
|
|
cfDescriptors.add( |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
|
new ColumnFamilyOptions())); |
|
|
|
new ColumnFamilyOptions())); |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
new ArrayList<>(); |
|
|
|
new ArrayList<>(); |
|
|
|
Options options = new Options(); |
|
|
|
options = new Options(); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
|
|
|
|
|
|
|
|
RocksDB db = RocksDB.open(options, |
|
|
|
db = RocksDB.open(options, |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
db.close(); |
|
|
|
db.close(); |
|
|
|
RocksDB rDb = RocksDB.openReadOnly( |
|
|
|
rDb = RocksDB.openReadOnly( |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
|
|
|
|
|
|
|
|
// test that put fails in readonly mode
|
|
|
|
// test that put fails in readonly mode
|
|
|
|
rDb.put("key".getBytes(), "value".getBytes()); |
|
|
|
rDb.put("key".getBytes(), "value".getBytes()); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
if (db != null) { |
|
|
|
|
|
|
|
db.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (rDb != null) { |
|
|
|
|
|
|
|
rDb.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (options != null) { |
|
|
|
|
|
|
|
options.dispose(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
public void failToCFWriteInReadOnly() throws RocksDBException { |
|
|
|
public void failToCFWriteInReadOnly() throws RocksDBException { |
|
|
|
|
|
|
|
RocksDB db = null; |
|
|
|
|
|
|
|
RocksDB rDb = null; |
|
|
|
|
|
|
|
Options options = null; |
|
|
|
|
|
|
|
try { |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
cfDescriptors.add( |
|
|
|
cfDescriptors.add( |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
|
new ColumnFamilyOptions())); |
|
|
|
new ColumnFamilyOptions())); |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
new ArrayList<>(); |
|
|
|
new ArrayList<>(); |
|
|
|
|
|
|
|
options = new Options(); |
|
|
|
Options options = new Options(); |
|
|
|
|
|
|
|
options.setCreateIfMissing(true); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
|
|
|
|
|
|
|
|
RocksDB db = RocksDB.open(options, |
|
|
|
db = RocksDB.open(options, |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
db.close(); |
|
|
|
db.close(); |
|
|
|
RocksDB rDb = RocksDB.openReadOnly( |
|
|
|
rDb = RocksDB.openReadOnly( |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
|
|
|
|
|
|
|
|
rDb.put(readOnlyColumnFamilyHandleList.get(0), |
|
|
|
rDb.put(readOnlyColumnFamilyHandleList.get(0), |
|
|
|
"key".getBytes(), "value".getBytes()); |
|
|
|
"key".getBytes(), "value".getBytes()); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
if (db != null) { |
|
|
|
|
|
|
|
db.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (rDb != null) { |
|
|
|
|
|
|
|
rDb.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (options != null) { |
|
|
|
|
|
|
|
options.dispose(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
public void failToRemoveInReadOnly() throws RocksDBException { |
|
|
|
public void failToRemoveInReadOnly() throws RocksDBException { |
|
|
|
|
|
|
|
RocksDB db = null; |
|
|
|
|
|
|
|
RocksDB rDb = null; |
|
|
|
|
|
|
|
Options options = null; |
|
|
|
|
|
|
|
try { |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
cfDescriptors.add( |
|
|
|
cfDescriptors.add( |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
@ -138,21 +183,36 @@ public class ReadOnlyTest { |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
new ArrayList<>(); |
|
|
|
new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
Options options = new Options(); |
|
|
|
options = new Options(); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
|
|
|
|
|
|
|
|
RocksDB db = RocksDB.open(options, |
|
|
|
db = RocksDB.open(options, |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
db.close(); |
|
|
|
db.close(); |
|
|
|
RocksDB rDb = RocksDB.openReadOnly( |
|
|
|
rDb = RocksDB.openReadOnly( |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
|
|
|
|
|
|
|
|
rDb.remove("key".getBytes()); |
|
|
|
rDb.remove("key".getBytes()); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
if (db != null) { |
|
|
|
|
|
|
|
db.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (rDb != null) { |
|
|
|
|
|
|
|
rDb.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (options != null) { |
|
|
|
|
|
|
|
options.dispose(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
public void failToCFRemoveInReadOnly() throws RocksDBException { |
|
|
|
public void failToCFRemoveInReadOnly() throws RocksDBException { |
|
|
|
|
|
|
|
RocksDB db = null; |
|
|
|
|
|
|
|
RocksDB rDb = null; |
|
|
|
|
|
|
|
Options options = null; |
|
|
|
|
|
|
|
try { |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
cfDescriptors.add( |
|
|
|
cfDescriptors.add( |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
@ -160,23 +220,38 @@ public class ReadOnlyTest { |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
new ArrayList<>(); |
|
|
|
new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
Options options = new Options(); |
|
|
|
options = new Options(); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
|
|
|
|
|
|
|
|
RocksDB db = RocksDB.open(options, |
|
|
|
db = RocksDB.open(options, |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
db.close(); |
|
|
|
db.close(); |
|
|
|
|
|
|
|
|
|
|
|
RocksDB rDb = RocksDB.openReadOnly( |
|
|
|
rDb = RocksDB.openReadOnly( |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
|
|
|
|
|
|
|
|
rDb.remove(readOnlyColumnFamilyHandleList.get(0), |
|
|
|
rDb.remove(readOnlyColumnFamilyHandleList.get(0), |
|
|
|
"key".getBytes()); |
|
|
|
"key".getBytes()); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
if (db != null) { |
|
|
|
|
|
|
|
db.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (rDb != null) { |
|
|
|
|
|
|
|
rDb.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (options != null) { |
|
|
|
|
|
|
|
options.dispose(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
public void failToWriteBatchReadOnly() throws RocksDBException { |
|
|
|
public void failToWriteBatchReadOnly() throws RocksDBException { |
|
|
|
|
|
|
|
RocksDB db = null; |
|
|
|
|
|
|
|
RocksDB rDb = null; |
|
|
|
|
|
|
|
Options options = null; |
|
|
|
|
|
|
|
try { |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
cfDescriptors.add( |
|
|
|
cfDescriptors.add( |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
@ -184,24 +259,40 @@ public class ReadOnlyTest { |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
new ArrayList<>(); |
|
|
|
new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
Options options = new Options(); |
|
|
|
options = new Options(); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
|
|
|
|
|
|
|
|
RocksDB db = RocksDB.open(options, |
|
|
|
db = RocksDB.open(options, |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
db.close(); |
|
|
|
db.close(); |
|
|
|
|
|
|
|
|
|
|
|
RocksDB rDb = RocksDB.openReadOnly( |
|
|
|
rDb = RocksDB.openReadOnly( |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
|
|
|
|
|
|
|
|
WriteBatch wb = new WriteBatch(); |
|
|
|
WriteBatch wb = new WriteBatch(); |
|
|
|
wb.put("key".getBytes(), "value".getBytes()); |
|
|
|
wb.put("key".getBytes(), "value".getBytes()); |
|
|
|
rDb.write(new WriteOptions(), wb); |
|
|
|
rDb.write(new WriteOptions(), wb); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
if (db != null) { |
|
|
|
|
|
|
|
db.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (rDb != null) { |
|
|
|
|
|
|
|
rDb.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (options != null) { |
|
|
|
|
|
|
|
options.dispose(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
@Test(expected = RocksDBException.class) |
|
|
|
public void failToCFWriteBatchReadOnly() throws RocksDBException { |
|
|
|
public void failToCFWriteBatchReadOnly() throws RocksDBException { |
|
|
|
|
|
|
|
RocksDB db = null; |
|
|
|
|
|
|
|
RocksDB rDb = null; |
|
|
|
|
|
|
|
Options options = null; |
|
|
|
|
|
|
|
WriteBatch wb = null; |
|
|
|
|
|
|
|
try { |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
List<ColumnFamilyDescriptor> cfDescriptors = new ArrayList<>(); |
|
|
|
cfDescriptors.add( |
|
|
|
cfDescriptors.add( |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
|
new ColumnFamilyDescriptor(RocksDB.DEFAULT_COLUMN_FAMILY, |
|
|
@ -209,20 +300,34 @@ public class ReadOnlyTest { |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
List<ColumnFamilyHandle> readOnlyColumnFamilyHandleList = |
|
|
|
new ArrayList<>(); |
|
|
|
new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
Options options = new Options(); |
|
|
|
options = new Options(); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
options.setCreateIfMissing(true); |
|
|
|
|
|
|
|
|
|
|
|
RocksDB db = RocksDB.open(options, |
|
|
|
db = RocksDB.open(options, |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
dbFolder.getRoot().getAbsolutePath()); |
|
|
|
db.close(); |
|
|
|
db.close(); |
|
|
|
|
|
|
|
|
|
|
|
RocksDB rDb = RocksDB.openReadOnly( |
|
|
|
rDb = RocksDB.openReadOnly( |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
dbFolder.getRoot().getAbsolutePath(), cfDescriptors, |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
readOnlyColumnFamilyHandleList); |
|
|
|
|
|
|
|
|
|
|
|
WriteBatch wb = new WriteBatch(); |
|
|
|
wb = new WriteBatch(); |
|
|
|
wb.put(readOnlyColumnFamilyHandleList.get(0), |
|
|
|
wb.put(readOnlyColumnFamilyHandleList.get(0), |
|
|
|
"key".getBytes(), "value".getBytes()); |
|
|
|
"key".getBytes(), "value".getBytes()); |
|
|
|
rDb.write(new WriteOptions(), wb); |
|
|
|
rDb.write(new WriteOptions(), wb); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
if (db != null) { |
|
|
|
|
|
|
|
db.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (rDb != null) { |
|
|
|
|
|
|
|
rDb.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (options != null) { |
|
|
|
|
|
|
|
options.dispose(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (wb != null) { |
|
|
|
|
|
|
|
wb.dispose(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|