Example #1
0
        public static dsn_task_t CopyRemoteDirectory(
            dsn_address_t remote,
            string source_dir,
            string dest_dir,
            bool overwrite,
            TaskCode callbackCode,
            Servicelet callbackOwner,
            AioHandler callback,
            int hash = 0
            )
        {
            int        idx  = GlobalInterOpLookupTable.Put(callback);
            dsn_task_t task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash);

            Native.dsn_file_copy_remote_directory(remote, source_dir, dest_dir, overwrite, task, callbackOwner != null ? callbackOwner.tracker() : IntPtr.Zero);
            return(task);
        }
Example #2
0
        public static dsn_task_t FileWrite(
            dsn_handle_t hFile,
            byte[] buffer,
            int count,
            UInt64 offset,
            TaskCode callbackCode,
            Servicelet callbackOwner,
            AioHandler callback,
            int hash = 0
            )
        {
            int        idx  = GlobalInterOpLookupTable.Put(callback);
            dsn_task_t task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash);

            Native.dsn_file_write(hFile, buffer, count, offset, task, callbackOwner != null ? callbackOwner.tracker() : IntPtr.Zero);
            return(task);
        }
Example #3
0
        public static SafeTaskHandle CopyRemoteDirectory(
            ulong remote,
            string source_dir,
            string dest_dir,
            bool overwrite,
            TaskCode callbackCode,
            Clientlet callbackOwner,
            AioHandler callback,
            int hash = 0
            )
        {
            var idx  = GlobalInterOpLookupTable.Put(callback);
            var task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash, callbackOwner?.tracker() ?? IntPtr.Zero);

            Native.dsn_file_copy_remote_directory(remote, source_dir, dest_dir, overwrite, task);
            return(new SafeTaskHandle(task, idx));
        }
Example #4
0
        public static SafeTaskHandle FileWrite(
            dsn_handle_t hFile,
            byte[] buffer,
            int count,
            ulong offset,
            TaskCode callbackCode,
            Clientlet callbackOwner,
            AioHandler callback,
            int hash = 0
            )
        {
            var idx  = GlobalInterOpLookupTable.Put(callback);
            var task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash, callbackOwner?.tracker() ?? IntPtr.Zero);

            Native.dsn_file_write(hFile, buffer, count, offset, task);
            return(new SafeTaskHandle(task, idx));
        }
Example #5
0
 public static dsn_task_t CopyRemoteDirectory(
     dsn_address_t remote,
     string source_dir,
     string dest_dir,
     bool overwrite,
     TaskCode callbackCode,
     Servicelet callbackOwner,
     AioHandler callback,
     int hash = 0
     )
 {
     int idx = GlobalInterOpLookupTable.Put(callback);
     dsn_task_t task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash);
     Native.dsn_file_copy_remote_directory(remote, source_dir, dest_dir, overwrite, task, callbackOwner != null ? callbackOwner.tracker() : IntPtr.Zero);
     return task;
 }
Example #6
0
 public static dsn_task_t FileWrite(
     dsn_handle_t hFile,
     byte[] buffer,
     int count,
     UInt64 offset,
     TaskCode callbackCode,
     Servicelet callbackOwner,
     AioHandler callback,
     int hash = 0
     )
 {
     int idx = GlobalInterOpLookupTable.Put(callback);
     dsn_task_t task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash);
     Native.dsn_file_write(hFile, buffer, count, offset, task, callbackOwner != null ? callbackOwner.tracker() : IntPtr.Zero);
     return task;
 }
Example #7
0
 public static SafeTaskHandle CopyRemoteDirectory(
     ulong remote,
     string source_dir,
     string dest_dir,
     bool overwrite,
     TaskCode callbackCode,
     Clientlet callbackOwner,
     AioHandler callback,
     int hash = 0
     )
 {
     var idx = GlobalInterOpLookupTable.Put(callback);
     var task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash, callbackOwner?.tracker() ?? IntPtr.Zero);
     Native.dsn_file_copy_remote_directory(remote, source_dir, dest_dir, overwrite, task);
     return new SafeTaskHandle(task, idx);
 }            
Example #8
0
 public static SafeTaskHandle FileWrite(
     dsn_handle_t hFile,
     byte[] buffer,
     int count,
     ulong offset,
     TaskCode callbackCode,
     Clientlet callbackOwner,
     AioHandler callback,
     int hash = 0
     )
 {
     var idx = GlobalInterOpLookupTable.Put(callback);
     var task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash, callbackOwner?.tracker() ?? IntPtr.Zero);
     Native.dsn_file_write(hFile, buffer, count, offset, task);
     return new SafeTaskHandle(task, idx);
 }
Example #9
0
 public static SafeTaskHandle CopyRemoteFiles(
     dsn_address_t remote,
     string source_dir,
     string[] files,
     string dest_dir,
     bool overwrite, 
     TaskCode callbackCode,
     Clientlet callbackOwner,
     AioHandler callback,
     int hash = 0
     )
 {
     int idx = GlobalInterOpLookupTable.Put(callback);
     dsn_task_t task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash, callbackOwner != null ? callbackOwner.tracker() : IntPtr.Zero);
     Native.dsn_file_copy_remote_files(remote, source_dir, files, dest_dir, overwrite, task);
     return new SafeTaskHandle(task, idx);
 }
Example #10
0
 public static SafeTaskHandle FileRead(
     dsn_handle_t hFile,
     byte[] buffer,
     int count,
     UInt64 offset,
     TaskCode callbackCode,
     Clientlet callbackOwner,
     AioHandler callback,
     int hash = 0
     )
 {
     int idx = GlobalInterOpLookupTable.Put(callback);
     dsn_task_t task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash, callbackOwner != null ? callbackOwner.tracker() : IntPtr.Zero);
     Native.dsn_file_read(hFile, buffer, count, offset, task);
     return new SafeTaskHandle(task, idx);
 }