diff --git a/src/XrdFileCache/XrdFileCacheIOEntireFile.cc b/src/XrdFileCache/XrdFileCacheIOEntireFile.cc index f20dbf9a7cd..25fb8cdbff3 100644 --- a/src/XrdFileCache/XrdFileCacheIOEntireFile.cc +++ b/src/XrdFileCache/XrdFileCacheIOEntireFile.cc @@ -65,6 +65,11 @@ XrdOucCacheIO *IOEntireFile::Detach() return io; } +void IOEntireFile::Read (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rlen) +{ + iocb.Done(IOEntireFile::Read(buff, offs, rlen)); +} + int IOEntireFile::Read (char *buff, long long off, int size) { clLog()->Debug(XrdCl::AppMsg, "IOEntireFile::Read() [%p] %lld@%d %s", this, off, size, m_io.Path()); diff --git a/src/XrdFileCache/XrdFileCacheIOEntireFile.hh b/src/XrdFileCache/XrdFileCacheIOEntireFile.hh index 59f8704359e..1c2db014e9e 100644 --- a/src/XrdFileCache/XrdFileCacheIOEntireFile.hh +++ b/src/XrdFileCache/XrdFileCacheIOEntireFile.hh @@ -61,6 +61,19 @@ namespace XrdFileCache //--------------------------------------------------------------------- virtual int Read(char *Buffer, long long Offset, int Length); + //--------------------------------------------------------------------- + //! Asynchronous read. + //! + //! @param callback + //! @param Buffer + //! @param Offset + //! @param Length + //! + //! @return number of bytes read + //--------------------------------------------------------------------- + virtual void Read (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rlen); + + //--------------------------------------------------------------------- //! Pass ReadV request to the corresponding File object. //!