Examples of Toss


Examples of org.hivedb.util.functional.Toss

    final String key = new String("North America");

    hive.directory().insertPrimaryIndexKey(key);
    hive.updateHiveStatus(Status.readOnly);

    AssertUtils.assertThrows(new Toss() {

      public void f() throws Exception {
        hive.connection().getByPartitionKey(key, AccessType.ReadWrite);
      }
    }, HiveLockableException.class);
View Full Code Here

Examples of org.hivedb.util.functional.Toss

    hive.updateHiveStatus(Status.readOnly);
    hive = null;

    final Hive fetchedHive = Hive.load(getConnectString(getHiveDatabaseName()), CachingDataSourceProvider.getInstance());

    AssertUtils.assertThrows(new Toss() {

      public void f() throws Exception {
        fetchedHive.connection().getByPartitionKey(key, AccessType.ReadWrite);
      }
    }, HiveLockableException.class);
View Full Code Here

Examples of org.hivedb.util.functional.Toss

    hive.directory().insertPrimaryIndexKey(key);
    NodeResolver directory = new DbDirectory(partitionDimension, CachingDataSourceProvider.getInstance().getDataSource(hive.getUri()));
    for (Integer id : Transform.map(DirectoryWrapper.semaphoreToId(), directory.getKeySemamphoresOfPrimaryIndexKey(key)))
      hive.getNode(id).setStatus(Status.readOnly);

    AssertUtils.assertThrows(new Toss() {
      public void f() throws Exception {
        hive.connection().getByPartitionKey(key, AccessType.ReadWrite);
      }
    }, HiveLockableException.class);
  }
View Full Code Here

Examples of org.hivedb.util.functional.Toss

      hive.updateNodeStatus(hive.getNode(id), Status.readOnly);
    hive = null;

    final Hive fetchedHive = Hive.load(getConnectString(getHiveDatabaseName()), CachingDataSourceProvider.getInstance());

    AssertUtils.assertThrows(new Toss() {

      public void f() throws Exception {
        fetchedHive.connection().getByPartitionKey(key, AccessType.ReadWrite);
      }
    }, HiveLockableException.class);
View Full Code Here

Examples of org.hivedb.util.functional.Toss

    final String key = new String("Atlantis");

    hive.directory().insertPrimaryIndexKey(key);
    hive.directory().updatePrimaryIndexKeyReadOnly(key, true);

    AssertUtils.assertThrows(new Toss() {

      public void f() throws Exception {
        hive.connection().getByPartitionKey(key, AccessType.ReadWrite);
      }
    }, HiveLockableException.class);
View Full Code Here

Examples of org.hivedb.util.functional.Toss

    hive.directory().updatePrimaryIndexKeyReadOnly(key, true);
    hive = null;

    final Hive fetchedHive = Hive.load(getConnectString(getHiveDatabaseName()), CachingDataSourceProvider.getInstance());

    AssertUtils.assertThrows(new Toss() {

      public void f() throws Exception {
        fetchedHive.connection().getByPartitionKey(key, AccessType.ReadWrite);
      }
    }, HiveLockableException.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.