Handbook
Glossary
bitcask
Vocabulary
bitcask
Definition
IN:
bitcask
TUPLE:
bitcask
path index
;
Methods
USING:
accessors
assocs
bitcask
bitcask.private
io
io.encodings.binary
io.files
kernel
;
M:
bitcask
>alist
dup
path>>
binary
[
index>>
[
seek-absolute
seek-input
read-entry
t
assert=
]
{
}
assoc-map-as
]
with-file-reader
;
USING:
accessors
assocs
bitcask
;
M:
bitcask
assoc-size
index>>
assoc-size
;
USING:
accessors
assocs
bitcask
bitcask.private
io
io.encodings.binary
io.files
kernel
;
M::
bitcask
at*
( key bitcask -- value/f ? )
key bitcask
index>>
at*
[
bitcask
path>>
binary
[
seek-absolute
seek-input
read-entry
]
with-file-reader
]
[
drop
f
f
]
if
;
USING:
accessors
assocs
bitcask
bitcask.private
io.encodings.binary
io.files
kernel
sequences
;
M:
bitcask
clear-assoc
dup
path>>
binary
[
index>>
dup
keys
[
write-tombstone
]
each
clear-assoc
]
with-file-appender
;
USING:
accessors
assocs
bitcask
bitcask.private
io.encodings.binary
io.files
kernel
;
M::
bitcask
delete-at
( key bitcask -- )
key bitcask
index>>
key?
[
bitcask
path>>
binary
[
key
write-tombstone
key bitcask
index>>
delete-at
]
with-file-appender
]
when
;
USING:
accessors
assocs
bitcask
;
M:
bitcask
keys
index>>
keys
;
USING:
accessors
assocs
bitcask
bitcask.private
io
io.encodings.binary
io.files
;
M::
bitcask
set-at
( value key bitcask -- )
bitcask
path>>
binary
[
tell-output
key value
write-entry
key bitcask
index>>
set-at
]
with-file-appender
;
USING:
accessors
assocs
bitcask
bitcask.private
io
io.encodings.binary
io.files
kernel
sequences
;
M:
bitcask
values
dup
path>>
binary
[
index>>
values
[
seek-absolute
seek-input
read-entry
t
assert=
]
map
]
with-file-reader
;