Examples of Dbt


Examples of com.sleepycat.db.Dbt

            (String) hidlistTranslation.get(
              helpTextId.toUpperCase().replace(':', '_'));
          if (tHid != null)
            helpTextId = tHid;
          helpTextId = URLEncoder.encode(helpTextId);
          Dbt keyDbt = new Dbt(helpTextId.getBytes("UTF8"));
          Dbt textDbt = new Dbt(helpTextText.getBytes("UTF8"));
          helpText.put(null, keyDbt, textDbt, 0);
        }
      }
      // now the indexing
      // and last the helptexts
View Full Code Here

Examples of com.sleepycat.db.Dbt

      (String) hidlistTranslation.get(
        hid.toUpperCase().replace(':', '_'));
    if (translatedHid != null)
      hid = translatedHid;
    hid = URLEncoder.encode(hid);
    Dbt key = new Dbt(hid.getBytes("UTF8"));

    int fileLen = fileB.length;
    if (anchorB != null)
      fileLen += (1 + anchorB.length);
    int dataLen = 1 + fileLen + 1 + jarfileB.length + 1 + titleB.length;
    byte[] dataB = new byte[dataLen];
    int i = 0;
    dataB[i++] = (byte) fileLen;
    for (int j = 0; j < fileB.length; ++j)
      dataB[i++] = fileB[j];
    if (anchorB != null) {
      dataB[i++] = '#';
      for (int j = 0; j < anchorB.length; ++j)
        dataB[i++] = anchorB[j];
    }
    dataB[i++] = (byte) jarfileB.length;
    for (int j = 0; j < jarfileB.length; ++j)
      dataB[i++] = jarfileB[j];

    dataB[i++] = (byte) titleB.length;
    for (int j = 0; j < titleB.length; ++j)
      dataB[i++] = titleB[j];
    Dbt data = new Dbt(dataB);
    dbBase.put(null, key, data, 0);
  }
View Full Code Here

Examples of com.sleepycat.db.Dbt

        if (cursorDbType == Db.DB_BTREE) {
            if (otherThang == null) {
                otherThang = new DataThang();
            }
            Dbt discardThang = DataThang.getDiscardDataThang();
            cursor.get(discardThang, otherThang, Db.DB_GET_RECNO);
            return otherThang.get_recno_key_data();
        } else {
            // Assume QUEUE or RECNO database.
            return keyThang.get_recno_key_data();
View Full Code Here

Examples of com.sleepycat.db.Dbt

    }

    public void addMessage(ActiveMQMessage message) throws JMSException {
        String messageID = message.getJMSMessageID();
        try {
            Dbt key = createKey(messageID);
            Dbt value = new Dbt(asBytes(message));
            database.put(BDbHelper.getTransaction(), key, value, 0);
        }
        catch (DbException e) {
            throw JMSExceptionHelper.newJMSException("Failed to broker message: " + messageID + " in container: " + e, e);
        }
View Full Code Here

Examples of com.sleepycat.db.Dbt

    public ActiveMQMessage getMessage(MessageIdentity identity) throws JMSException {
        String messageID = identity.getMessageID();
        ActiveMQMessage answer = null;
        try {
            Dbt key = createKey(messageID);
            Dbt value = new Dbt();
            if (database.get(null, key, value, 0) == SUCCESS) {
                answer = extractMessage(value);
            }
            return answer;
        }
View Full Code Here

Examples of com.sleepycat.db.Dbt


    // Implementation methods
    //-------------------------------------------------------------------------
    protected Dbt createKey(String messageID) {
        Dbt key = new Dbt(asBytes(messageID));
        return key;
    }
View Full Code Here

Examples of com.sleepycat.db.Dbt

    }

    public MessageIdentity addMessage(ActiveMQMessage message) throws JMSException {
        String messageID = message.getJMSMessageID();
        try {
            Dbt key = createKey(messageID);
            Dbt value = new Dbt(asBytes(message));
            database.put(BDbHelper.getTransaction(), key, value, 0);
            return new MessageIdentity(messageID);
        }
        catch (DbException e) {
            throw JMSExceptionHelper.newJMSException("Failed to broker message: " + messageID + " in container: " + e, e);
View Full Code Here

Examples of com.sleepycat.db.Dbt

    public ActiveMQMessage getMessage(MessageIdentity identity) throws JMSException {
        String messageID = identity.getMessageID();
        ActiveMQMessage answer = null;
        try {
            Dbt key = createKey(messageID);
            Dbt value = new Dbt();
            if (database.get(null, key, value, 0) == SUCCESS) {
                answer = extractMessage(value);
            }
            return answer;
        }
View Full Code Here

Examples of com.sleepycat.db.Dbt


    // Implementation methods
    //-------------------------------------------------------------------------
    protected Dbt createKey(String messageID) {
        Dbt key = new Dbt(asBytes(messageID));
        return key;
    }
View Full Code Here

Examples of com.sleepycat.db.Dbt

    private WireFormat wireFormat;

    public void addMessage(ActiveMQMessage message) throws JMSException {
        String messageID = message.getJMSMessageID();
        try {
            Dbt key = createKey(messageID);
            Dbt value = new Dbt(asBytes(message));
            database.put(BDbHelper.getTransaction(), key, value, 0);
        }
        catch (DbException e) {
            throw JMSExceptionHelper.newJMSException("Failed to broker message: " + messageID + " in container: " + e, e);
        }
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.