2024-03-25 15:17:34 -07:00

131 lines
2.8 KiB
Plaintext

Subroutine NULL_MFS(CODE, BFS, HANDLE, NAME, FMC, RECORD, STATUS)
/* Name : SYSLISTS_MFS
* Description:
* Cache Temporary lists in memory to speed selects, reduce load on network, reduce GFE chances
* Open -- put the cache number in the handle
* Read/Reado -- add the record to the cache
* write/delete/clear -- Update remote, local copy
* omnievent -- fullcache
*
*
* Side Effects:
* Search of lists file will not show temp lists
*
*/
Declare Function RTI_HASHTABLE2, RTI_MD5,RTI_crc32, rti_memcached
Declare Subroutine RTI_HASHTABLE2, RTI_MD5, rti_memcached
$insert Logical
$insert FSErrors_100
$Insert FILE.SYSTEM.EQUATES
$Insert memcached_mfs_Equates
$Insert rti_memcached_equates
$Insert File.System.OnGoSub
Return
* -------------- Main Subs -----------------
READ.RECORD:
READO.RECORD:
WRITE.RECORD:
DELETE.RECORD:
CLEARFILE:
DELETE.FILE:
GOSUB NEXT.MFS
Return
* ---------------------------------------
* non-chained filing system calls
* ---------------------------------------
Flush:
Unlock.All:
Record = ""
Status = TRUE$
Return
Install:
Status = TRUE$
Return
* ---------------------------------------
* ---------------------------------------
* Chained Filing System Calls
* ---------------------------------------
LOCK.RECORD:
UNLOCK.RECORD:
GOSUB NEXT.MFS
RETURN
*--------------------------------------------------
SELECT:
READNEXT:
CLEARSELECT:
RECORD.COUNT:
* ---------------------------------------
CREATE.INDEX:
DELETE.INDEX:
UPDATE.INDEX:
SELECT.INDEX:
READNEXT.INDEX:
* ---------------------------------------
GOSUB NEXT.MFS
Return
Omni.Script:
GOSUB NEXT.MFS
Return
Reserved:
* there is a critical error if this line is reached
Status = FALSE$
Return
* ---------------------------------------
* On open, connect to a cache
* Use a "namespace" prefix to separate this table's data from another
* namespace rule is crc32 of handle+tablename, so if they attach the same table with a different volume they see different data
* Note - to "clear" a table from memcached you change the namespace
* If we ever want to support clear_Table, we must make clear_table change the namespace, perhaps we use handle + name + a clear_counter in the dict.
*
OPEN.FILE:
CREATE.FILE:
RENAME.FILE:
MOVE.FILE:
REMAKE.FILE:
* ----------------------------------------
Open.Media:
CREATE.MEDIA:
READ.MEDIA:
WRITE.MEDIA:
Close.Media:
gosub Next.MFS
Return
* ---------- End of Subroutine
* ==================================
* execute filing system chain
* ==================================
Next.MFS:
* Strips this MFS leaving the next fs as first element in array
FSList = delete(BFS, 1, 1, 1)
NextFS = FSList<1,1,1>
if len(NextFS) then
call @NextFS(Code, FSList, Handle, Name, Fmc, Record, Status)
End
Return