wrench::XRootD::UpdateCacheMessage

class UpdateCacheMessage : public wrench::XRootD::Message

A message sent to a XRootD Node to update the cache.

Public Functions

UpdateCacheMessage(S4U_CommPort *answer_commport, std::shared_ptr<StorageServiceFileReadRequestMessage> original, Node *node, std::shared_ptr<DataFile> file, std::set<std::shared_ptr<FileLocation>> locations, sg_size_t payload, std::shared_ptr<bool> answered)

Constructor.

Parameters:
  • answer_commport – The commport the final answer should be sent to

  • original – The original file read request being responded too. If this is a file locate search, this should be null

  • node – The node where the search was initiated

  • file – The file that was found

  • locations – All locations that where found in this subtree

  • payload – The message size in bytes

  • answered – A shared boolean for if the answer has been sent to the client. This should be the same for all messages searching for this request. Used to prevent the multiple response problem

UpdateCacheMessage(UpdateCacheMessage &other)

Reference Copy Constructor.

Parameters:

other – The message to copy.

UpdateCacheMessage(UpdateCacheMessage *other)

Pointer Copy Constructor.

Parameters:

other – The message to copy.

Public Members

S4U_CommPort *answer_commport

CommPort to which the FINAL answer message should be sent.

std::shared_ptr<bool> answered

Whether or not the calling client has been answered yet. Used to prevent answer_commport spamming for multiple file hits.

std::shared_ptr<DataFile> file

The file found.

set<std::shared_ptr<FileLocation>> locations

the locations to cache

Node *node

The highest node in the tree to return to when caching (should be the node the original message was sent)

std::shared_ptr<StorageServiceFileReadRequestMessage> original

The original file read request that kicked off the search (if null this was a lookup request)