I'm serving a file at the same time I'm copying it from the network
file system to the cache. If the client ask for data not yet copied, the
source file read operation is delegated the the copy thread as an
asynchronous operation because file seeking/reading is not thread
safe.
The copy session have to open two times the temporary file, one for
read-only and one for write only, because closing a read/write file
change the modification time. We want the modification time to be set to
a known value when the copy is finished even keeping read access to the
file.
The session manage a reference counter to know how many
TempFileDelegate instances are using the session to delegate read
operations. This is done for two reasons:
|
__init__(self,
plug,
sourcePath,
sourceFile,
sourceInfo) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_cancelCopy(self,
closeSource,
closeTempWrite) |
source code
|
|
|
_onCopyCancelled(self,
closeSource,
closeTempWrite) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from extern.log.log.Loggable :
__providedBy__ ,
__provides__ ,
debug ,
doLog ,
error ,
info ,
log ,
logFunction ,
logObjectName ,
warning ,
warningFailure ,
writeMarker
|