Package one.microstream.afs
Class AFile.Wrapper.Abstract<U>
java.lang.Object
one.microstream.afs.AItem.Base
one.microstream.afs.AFile.Wrapper.Abstract<U>
- All Implemented Interfaces:
AFile
,AFile.Wrapper
,AItem
,AItem.Wrapper
- Direct Known Subclasses:
BlobStoreFileWrapper.Abstract
,NioFileWrapper.Abstract
,SqlFileWrapper.Abstract
- Enclosing interface:
- AFile.Wrapper
public abstract static class AFile.Wrapper.Abstract<U> extends AItem.Base implements AFile.Wrapper
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.afs.AFile
AFile.Default, AFile.Observer, AFile.Wrapper
Nested classes/interfaces inherited from interface one.microstream.afs.AFile.Wrapper
AFile.Wrapper.Abstract<U>
Nested classes/interfaces inherited from interface one.microstream.afs.AItem
AItem.Abstract, AItem.Base, AItem.Wrapper
-
Constructor Summary
Constructors Constructor Description Abstract()
-
Method Summary
Modifier and Type Method Description AFile
actual()
boolean
exists()
Queries whether the item represented by this instance actually physically exists on the underlying storage layer.AFileSystem
fileSystem()
String
identifier()
The value that uniquely identifies the item locally in itsAItem.parent()
directory.<C extends Consumer<? super AFile.Observer>>
CiterateObservers(C logic)
String
name()
A simple String representing the "name" of the file.ADirectory
parent()
The directory (identifying container) in which this item is located and in which no other item can have the sameAItem.identifier()
as this item.boolean
registerObserver(AFile.Observer observer)
boolean
removeObserver(AFile.Observer observer)
String
type()
An optional String defining the type of the file's content.U
user()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface one.microstream.afs.AFile
defaultUser, ensureExists, isEmpty, isUsed, size, toPath, toPathString, tryUseReading, tryUseReading, tryUseWriting, tryUseWriting, useReading, useReading, useWriting, useWriting
-
Constructor Details
-
Abstract
public Abstract()
-
-
Method Details
-
user
- Specified by:
user
in interfaceAItem.Wrapper
-
actual
- Specified by:
actual
in interfaceAFile.Wrapper
- Specified by:
actual
in interfaceAItem.Wrapper
-
fileSystem
- Specified by:
fileSystem
in interfaceAItem
-
registerObserver
- Specified by:
registerObserver
in interfaceAFile
-
removeObserver
- Specified by:
removeObserver
in interfaceAFile
-
iterateObservers
- Specified by:
iterateObservers
in interfaceAFile
-
parent
Description copied from interface:AItem
The directory (identifying container) in which this item is located and in which no other item can have the sameAItem.identifier()
as this item.- Specified by:
parent
in interfaceAItem
- Returns:
- the item's parent directory.
- See Also:
AItem.identifier()
,AItem.toPathString()
-
identifier
Description copied from interface:AItem
The value that uniquely identifies the item locally in itsAItem.parent()
directory.Note that this value might be a combination of
#name()
and#type()
, but such a relation is not mandatory.- Specified by:
identifier
in interfaceAItem
- Returns:
- the item's locally unique identifier.
- See Also:
AItem.parent()
,AItem.toPathString()
,#name()
,#type()
-
name
Description copied from interface:AFile
A simple String representing the "name" of the file. While no two files can have the sameAItem.identifier()
inside a given directory, any number of files can have the same name.Depending on the file system implementation,
AFile.name()
might be the same value asAItem.identifier()
, but whileAItem.identifier()
is guaranteed to be a unique local identifier for any file system,AFile.name()
is not.- Specified by:
name
in interfaceAFile
- Returns:
- the file's name.
- See Also:
AFile.toPathString()
,AItem.identifier()
,AFile.type()
-
type
Description copied from interface:AFile
An optional String defining the type of the file's content.If such an information makes no sense for a certain file system, this value may be
null
. -
exists
public boolean exists()Description copied from interface:AItem
Queries whether the item represented by this instance actually physically exists on the underlying storage layer.
-