'Helper method for subclasses.
For this implementation, this method is responsible for renaming the
temporary file to the final name and directory location.  This method
should be called after the final call to
:func:`swift.obj.diskfile.DiskFileWriter.write`.
:param metadata: dictionary of metadata to be associated with the
object
:param cleanup: a Boolean. If True then obsolete files will be removed
from the object dir after the put completes, otherwise
obsolete files are left in place.'

def _put(self, metadata, cleanup=True, *a, **kw):

    timestamp = Timestamp(metadata['X-Timestamp'])
    ctype_timestamp = metadata.get('Content-Type-Timestamp')
    if ctype_timestamp:
        ctype_timestamp = Timestamp(ctype_timestamp)
    filename = self.manager.make_on_disk_filename(timestamp, self._extension, ctype_timestamp=ctype_timestamp, *a, **kw)
    metadata['name'] = self._name
    target_path = join(self._datadir, filename)
    tpool_reraise(self._finalize_put, metadata, target_path, cleanup)
