Examples of ReferenceData


Examples of com.opengamma.bbg.referencedata.ReferenceData

        for (String fieldName : request.getFields()) {
          Object fieldValue = allFieldData.getValue(fieldName);
          fieldData.add(fieldName, fieldValue);
        }
      }
      ReferenceData refData = new ReferenceData(identifier, fieldData);
      result.addReferenceData(refData);
    }
    return result;
  }
View Full Code Here

Examples of org.apache.activemq.store.ReferenceStore.ReferenceData

            });
        }
    }

    final void addMessage(final Message message, final Location location) throws InterruptedIOException {
        ReferenceData data = new ReferenceData();
        data.setExpiration(message.getExpiration());
        data.setFileId(location.getDataFileId());
        data.setOffset(location.getOffset());
        synchronized (this) {
            lastLocation = location;
            messages.put(message.getMessageId(), data);
            this.peristenceAdapter.addInProgressDataFile(this, location.getDataFileId());
        }
View Full Code Here

Examples of org.apache.activemq.store.ReferenceStore.ReferenceData

    public boolean replayAddMessage(ConnectionContext context, Message message, Location location) {
        MessageId id = message.getMessageId();
        try {
            // Only add the message if it has not already been added.
            ReferenceData data = referenceStore.getMessageReference(id);
            if (data == null) {
                data = new ReferenceData();
                data.setExpiration(message.getExpiration());
                data.setFileId(location.getDataFileId());
                data.setOffset(location.getOffset());
                referenceStore.addMessageReference(context, id, data);
                return true;
            }
        } catch (Throwable e) {
            LOG.warn("Could not replay add for message '" + id + "'.  Message may have already been added. reason: " + e, e);
View Full Code Here

Examples of org.apache.activemq.store.ReferenceStore.ReferenceData

            });
        }
    }

    final void removeMessage(final MessageAck ack, final Location location) throws InterruptedIOException {
        ReferenceData data;
        synchronized (this) {
            lastLocation = location;
            MessageId id = ack.getLastMessageId();
            data = messages.remove(id);
            if (data == null) {
View Full Code Here

Examples of org.apache.activemq.store.ReferenceStore.ReferenceData

    }
     
    public boolean replayRemoveMessage(ConnectionContext context, MessageAck messageAck) {
        try {
            // Only remove the message if it has not already been removed.
            ReferenceData t = referenceStore.getMessageReference(messageAck.getLastMessageId());
            if (t != null) {
                referenceStore.removeMessage(context, messageAck);
                return true;
            }
        } catch (Throwable e) {
View Full Code Here

Examples of org.apache.activemq.store.ReferenceStore.ReferenceData

        }
        return null;
    }
   
    protected Location getLocation(MessageId messageId) throws IOException {
        ReferenceData data = null;
        synchronized (this) {
            // Is it still in flight???
            data = messages.get(messageId);
            if (data == null && cpAddedMessageIds != null) {
                data = cpAddedMessageIds.get(messageId);
            }
        }
        if (data == null) {
            data = referenceStore.getMessageReference(messageId);
            if (data == null) {
                return null;
            }
        }
        Location location = new Location();
        location.setDataFileId(data.getFileId());
        location.setOffset(data.getOffset());
        return location;
    }
View Full Code Here

Examples of org.apache.activemq.store.ReferenceStore.ReferenceData

            });
        }
    }

    final void addMessage(final Message message, final Location location) throws InterruptedIOException {
        ReferenceData data = new ReferenceData();
        data.setExpiration(message.getExpiration());
        data.setFileId(location.getDataFileId());
        data.setOffset(location.getOffset());
         lock.lock();
         try {
            lastLocation = location;
            messages.put(message.getMessageId(), data);
        }finally {
View Full Code Here

Examples of org.apache.activemq.store.ReferenceStore.ReferenceData

    public boolean replayAddMessage(ConnectionContext context, Message message, Location location) {
        MessageId id = message.getMessageId();
        try {
            // Only add the message if it has not already been added.
            ReferenceData data = referenceStore.getMessageReference(id);
            if (data == null) {
                data = new ReferenceData();
                data.setExpiration(message.getExpiration());
                data.setFileId(location.getDataFileId());
                data.setOffset(location.getOffset());
                referenceStore.addMessageReference(context, id, data);
                return true;
            }
        } catch (Throwable e) {
            LOG.warn("Could not replay add for message '" + id + "'.  Message may have already been added. reason: " + e, e);
View Full Code Here

Examples of org.apache.activemq.store.ReferenceStore.ReferenceData

            });
        }
    }

    final void removeMessage(final MessageAck ack, final Location location) throws InterruptedIOException {
        ReferenceData data;
        lock.lock();
        try{
            lastLocation = location;
            MessageId id = ack.getLastMessageId();
            data = messages.remove(id);
            if (data == null) {
                messageAcks.add(ack);
            } else {
                // message never got written so datafileReference will still exist
                AMQMessageStore.this.peristenceAdapter.removeInProgressDataFile(AMQMessageStore.this, data.getFileId());
            }
        }finally {
            lock.unlock();
        }
        if (messageAcks.size() > this.peristenceAdapter.getMaxCheckpointMessageAddSize()) {
View Full Code Here

Examples of org.apache.activemq.store.ReferenceStore.ReferenceData

    }
     
    public boolean replayRemoveMessage(ConnectionContext context, MessageAck messageAck) {
        try {
            // Only remove the message if it has not already been removed.
            ReferenceData t = referenceStore.getMessageReference(messageAck.getLastMessageId());
            if (t != null) {
                referenceStore.removeMessage(context, messageAck);
                return true;
            }
        } catch (Throwable 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.