Skip to contents

An R6 class for creating a content addressable storage.

Value

A CAS object.

Active bindings

hash_algorithm

Hash algorithm

members_instantiated

Have the members been instantiated?

size

Return directory size

Methods

Inherited methods


Method create()

Create CAS.

Usage

CAS$create(compression_level = -7, algo = NULL, keep_open = TRUE)

Arguments

compression_level

Set an integer value for ZSTD compression level.

algo

Select a hash algorithm to be used.

keep_open

Should CAS be kept opened after creation? Default is TRUE; the mode will be "WRITE".

Returns

The object, invisibly


Method open()

Open CAS object for read or write.

Settinginstantiate argument to TRUE, all members will be instantiated and cached on opening. They can be accessed via members active field, i.e., using <member>$object element.

Usage

CAS$open(mode = c("READ", "WRITE"), instantiate = FALSE)

Arguments

mode

Mode to open : either "READ" or "WRITE". Default is "READ".

instantiate

Should be all members be instantiated at opening? Default is FALSE.

Returns

The object, invisibly.


Method close()

Close the group object.

All instantiated group members will be closed if opened, and before closing the group object.

Usage

CAS$close()

Returns

The object, invisibly.


Method destroy()

Delete CAS.

Usage

CAS$destroy()

Returns

The object, invisibly.


Method filter_keys()

Filter tbl_keys by key and namespace

Usage

CAS$filter_keys(key, namespace, attrnames = character())

Arguments

key

A character vector of keys.

namespace

A character vector of namespaces.

attrnames

A character vector with tiledb attributes (columns).

Returns

A `data.table.


Method dir_tree()

Print directory contents.

Usage

CAS$dir_tree(what = c("all", "keys", "data"))

Arguments

what

Select directory: 'all' for storr, 'keys' for tbl_keys array and 'data' for tbl_data array.

Returns

A character vector with file paths, invisibly.


Method dump()

Dump the Storr structure to string.

Usage

CAS$dump()

Returns

A character string, invisibly.


Method clone()

The objects of this class are cloneable with this method.

Usage

CAS$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.