Package com.cloudhopper.datastore

Examples of com.cloudhopper.datastore.DataStoreFatalException


        firstItemId = key.getItemId();
       
        // start adding things to the "front" queue
        useBackQueue = false;
    } else if (key.getItemId() < lastItemId+1) {
        throw new DataStoreFatalException("ItemId out of order while loading queue itemId=" + key.getItemId() + " < " + (lastItemId+1));
    } else {
        // key is in the correct order, no issue
    }
      }
      if (useBackQueue) {
View Full Code Here


    // is really the first itemId
    if (key.getItemId() > lastItemId + 1) {
        // the current itemId is actually our first item
        firstItemId = key.getItemId();
        } else if (key.getItemId() < lastItemId + 1) {
        throw new DataStoreFatalException("ItemId out of order while loading queue itemId=" + key.getItemId() + " < " + (lastItemId + 1));
    } else {
        // key is in the correct order, no issue
    }
      }
      // set this lastItemId to the current itemId
View Full Code Here

      CompositeKey key = priorityKeyUtil.decode(record.getKey());

      PriorityMQMessage.Key pkey = new PriorityMQMessage.Key(key.getItemId());
      if (key.getQueueId() != getId()) {
    logger.error("{} != {}: {} for queue {}", key.getQueueId(), getId(), pkey, this);
    throw new DataStoreFatalException("The next item wasn't for this queueId");
      }
      if (DEBUG) {
    logger.trace("doTake[{}]: {}", getId(), pkey);
    trxLog.offer(pkey.toCompactString("TAKE:"));
      }
View Full Code Here

    public Record getRecord() throws DataStoreFatalException {
        byte[] key = cursor.key();
        byte[] value = cursor.val();
        if (key == null || value == null) {
            throw new DataStoreFatalException("Record key or value was null");
        }
        return new Record(key, value);
    }
View Full Code Here

        byte[] key = cursor.get_key(false);
        byte[] value = cursor.get_value(false);
        if (key == null) {
      Error e = db.error();
      if (e != null) logger.warn("Kyoto reporting error {}", errorToString(e));
            throw new DataStoreFatalException("Record key was null", e);
  }
  if (value == null) {
      Error e = db.error();
      if (e != null) logger.warn("Kyoto reporting error {}", errorToString(e));
            throw new DataStoreFatalException("Record value for key "+new String(key)+" was null", e);
        }
        return new Record(key, value);
    }
View Full Code Here

    public Record getRecord() throws DataStoreFatalException {
        byte[] key = currentEntry.getKey();
        byte[] value = currentEntry.getValue();
        if (key == null || value == null) {
            throw new DataStoreFatalException("Record key or value was null");
        }
        return new Record(key, value);
    }
View Full Code Here

    public void close() throws DataStoreFatalException {
  try {
      cursor.close();
      cursor = null;
  } catch (IOException e) {
      throw new DataStoreFatalException("Error closing store", e);
  }
    }
View Full Code Here

TOP

Related Classes of com.cloudhopper.datastore.DataStoreFatalException

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.