Package io.datarouter.storage.file
Class Directory
java.lang.Object
io.datarouter.storage.file.Directory
- All Implemented Interfaces:
NodeOps<PathbeanKey,Pathbean>,BlobStorage<PathbeanKey,Pathbean>,BlobStorageReader<PathbeanKey,Pathbean>,BlobStorageWriter<PathbeanKey,Pathbean>
public class Directory extends Object implements BlobStorage<PathbeanKey,Pathbean>
Lightweight directory representation that is not tracked by the framework. Duplicates can be created at will for
convenience in the application.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.datarouter.storage.node.op.raw.BlobStorage
BlobStorage.BlobStorageNode<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>,F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK,D>>, BlobStorage.PhysicalBlobStorageNode<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>,F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK,D>> -
Constructor Summary
Constructors Constructor Description Directory(BlobStorage<PathbeanKey,Pathbean> parent)Directory(BlobStorage<PathbeanKey,Pathbean> parent, Subpath subpathInParent)Directory(BlobStorage<PathbeanKey,Pathbean> parent, Subpath subpathInParent, String counterName) -
Method Summary
Modifier and Type Method Description voiddelete(PathbeanKey key)voiddeleteAll(Subpath subpath)Delete all descendants and the subpath directorybooleanexists(PathbeanKey key)StringgetBucket()SubpathgetRootPath()Optional<Long>length(PathbeanKey key)byte[]read(PathbeanKey key)byte[]read(PathbeanKey key, long offset, int length)io.datarouter.scanner.Scanner<List<PathbeanKey>>scanKeysPaged(Subpath subpath)io.datarouter.scanner.Scanner<List<Pathbean>>scanPaged(Subpath subpath)Directorysubdirectory(Subpath subpathInParent)Directorysubdirectory(Subpath subpathInParent, String counterName)StringtoString()voidwrite(PathbeanKey key, byte[] value)voidwrite(PathbeanKey key, io.datarouter.scanner.Scanner<byte[]> chunks)voidwrite(PathbeanKey key, InputStream inputStream)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.datarouter.storage.node.op.raw.read.BlobStorageReader
scan, scanChunks, scanKeys
-
Constructor Details
-
Directory
-
Directory
-
Directory
public Directory(BlobStorage<PathbeanKey,Pathbean> parent, Subpath subpathInParent, String counterName)
-
-
Method Details
-
subdirectory
-
subdirectory
-
write
- Specified by:
writein interfaceBlobStorageWriter<PathbeanKey,Pathbean>
-
write
- Specified by:
writein interfaceBlobStorageWriter<PathbeanKey,Pathbean>
-
write
- Specified by:
writein interfaceBlobStorageWriter<PathbeanKey,Pathbean>
-
delete
- Specified by:
deletein interfaceBlobStorageWriter<PathbeanKey,Pathbean>
-
deleteAll
Description copied from interface:BlobStorageWriterDelete all descendants and the subpath directory- Specified by:
deleteAllin interfaceBlobStorageWriter<PathbeanKey,Pathbean>
-
getBucket
- Specified by:
getBucketin interfaceBlobStorageReader<PathbeanKey,Pathbean>
-
getRootPath
- Specified by:
getRootPathin interfaceBlobStorageReader<PathbeanKey,Pathbean>
-
exists
- Specified by:
existsin interfaceBlobStorageReader<PathbeanKey,Pathbean>
-
length
- Specified by:
lengthin interfaceBlobStorageReader<PathbeanKey,Pathbean>
-
read
- Specified by:
readin interfaceBlobStorageReader<PathbeanKey,Pathbean>
-
read
- Specified by:
readin interfaceBlobStorageReader<PathbeanKey,Pathbean>
-
scanKeysPaged
- Specified by:
scanKeysPagedin interfaceBlobStorageReader<PathbeanKey,Pathbean>
-
scanPaged
- Specified by:
scanPagedin interfaceBlobStorageReader<PathbeanKey,Pathbean>
-
toString
-