Package org.hivedb.util.functional

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


    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

    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

      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

    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

    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

Related Classes of org.hivedb.util.functional.Toss

Copyright © 2018 www.massapicom. 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.