CloudflareDurableObjectStore constructor
CloudflareDurableObjectStore({
- required CloudflareDurableObjectNamespace namespace,
- String objectPrefix = 'routed-store',
- int shardCount = 16,
Performs the CloudflareDurableObjectStore operation.
Implementation
CloudflareDurableObjectStore({
required CloudflareDurableObjectNamespace namespace,
this.objectPrefix = 'routed-store',
this.shardCount = 16,
}) : _namespace = namespace {
if (objectPrefix.trim().isEmpty) {
throw ArgumentError.value(
objectPrefix,
'objectPrefix',
'must not be empty',
);
}
if (shardCount < 1 || shardCount > 256) {
throw ArgumentError.value(
shardCount,
'shardCount',
'must be between 1 and 256',
);
}
}