C# Класс FoundationDB.Layers.Directories.FdbDirectorySubspace

Наследование: FdbSubspace, IFdbDirectory
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ChangeLayerAsync ( IFdbTransaction trans, Slice newLayer ) : Task

Change the layer id of this directory

CheckLayer ( Slice layer ) : void

Ensure that this directory was registered with the correct layer id

CreateAsync ( IFdbTransaction trans, IEnumerable path, Slice layer = default(Slice) ) : Task

Creates a subdirectory with the given path (creating intermediate subdirectories if necessary). An exception is thrown if the given subdirectory already exists.

CreateOrOpenAsync ( IFdbTransaction trans, IEnumerable path, Slice layer = default(Slice) ) : Task

Opens a subdirectory with the given path. If the subdirectory does not exist, it is created (creating intermediate subdirectories if necessary).

DumpKey ( Slice key ) : string
ExistsAsync ( IFdbReadOnlyTransaction trans ) : Task

Checks if this directory exists

ExistsAsync ( IFdbReadOnlyTransaction trans, IEnumerable path ) : Task

Checks if a sub-directory exists

ListAsync ( IFdbReadOnlyTransaction trans ) : Task>

Returns the list of all the subdirectories of the current directory.

ListAsync ( IFdbReadOnlyTransaction trans, IEnumerable path ) : Task>

Returns the list of all the subdirectories of a sub-directory.

MoveToAsync ( IFdbTransaction trans, IEnumerable newAbsolutePath ) : Task

Moves the current directory to newAbsolutePath. There is no effect on the physical prefix of the given directory, or on clients that already have the directory open. An error is raised if a directory already exists at `new_path`, or if the new path points to a child of the current directory.

OpenAsync ( IFdbReadOnlyTransaction trans, IEnumerable path, Slice layer = default(Slice) ) : Task

Opens a subdirectory with the given path. An exception is thrown if the subdirectory does not exist, or if a layer is specified and a different layer was specified when the subdirectory was created.

RegisterAsync ( IFdbTransaction trans, IEnumerable path, Slice layer, Slice prefix ) : Task

Registers an existing prefix as a directory with the given path (creating parent directories if necessary). This method is only indented for advanced use cases.

RemoveAsync ( IFdbTransaction trans ) : System.Threading.Tasks.Task

Removes the directory, its contents, and all subdirectories. Warning: Clients that have already opened the directory might still insert data into its contents after it is removed.

RemoveAsync ( IFdbTransaction trans, IEnumerable path ) : System.Threading.Tasks.Task

Removes a sub-directory, its contents, and all subdirectories. Warning: Clients that have already opened the directory might still insert data into its contents after it is removed.

ToString ( ) : string

Returns a user-friendly description of this directory

TryCreateAsync ( IFdbTransaction trans, IEnumerable path, Slice layer = default(Slice) ) : Task

Creates a subdirectory with the given path (creating intermediate subdirectories if necessary). An exception is thrown if the given subdirectory already exists.

TryListAsync ( IFdbReadOnlyTransaction trans ) : Task>

Returns the list of all the subdirectories of a sub-directory, it it exists.

TryListAsync ( IFdbReadOnlyTransaction trans, IEnumerable path ) : Task>

Returns the list of all the subdirectories of the current directory, it it exists.

TryMoveToAsync ( IFdbTransaction trans, IEnumerable newPath ) : Task

Attempts to move the current directory to newPath. There is no effect on the physical prefix of the given directory, or on clients that already have the directory open.

TryOpenAsync ( IFdbReadOnlyTransaction trans, IEnumerable path, Slice layer = default(Slice) ) : Task

Opens a subdirectory with the given path. An exception is thrown if the subdirectory if a layer is specified and a different layer was specified when the subdirectory was created.

TryRemoveAsync ( IFdbTransaction trans ) : Task

Attempts to remove the directory, its contents, and all subdirectories. Warning: Clients that have already opened the directory might still insert data into its contents after it is removed.

TryRemoveAsync ( IFdbTransaction trans, IEnumerable path ) : Task

Attempts to remove a sub-directory, its contents, and all subdirectories. Warning: Clients that have already opened the directory might still insert data into its contents after it is removed.

Защищенные методы

Метод Описание
GetLayerForPath ( IFdbTuple relativeLocation ) : FdbDirectoryLayer

Return the DirectoryLayer instance that should be called for the given path

ToRelativePath ( IEnumerable path ) : IFdbTuple

Convert a path relative to this directory, into a path relative to the root of the current partition

ToRelativePath ( IFdbTuple location ) : IFdbTuple

Convert a path relative to this directory, into a path relative to the root of the current partition

Приватные методы

Метод Описание
FdbDirectorySubspace ( IFdbTuple location, IFdbTuple relativeLocation, Slice prefix, FdbDirectoryLayer directoryLayer, Slice layer ) : FoundationDB.Client
IFdbDirectory ( IFdbTransaction trans, IEnumerable oldPath, IEnumerable newPath ) : Task

Moves the specified subdirectory to newPath. There is no effect on the physical prefix of the given directory, or on clients that already have the directory open. An error is raised if a directory already exists at `new_path`.

Описание методов

ChangeLayerAsync() публичный Метод

Change the layer id of this directory
public ChangeLayerAsync ( IFdbTransaction trans, Slice newLayer ) : Task
trans IFdbTransaction Transaction to use for the operation
newLayer Slice New layer id of this directory
Результат Task

CheckLayer() публичный Метод

Ensure that this directory was registered with the correct layer id
If the directory was registerd with a different layer id
public CheckLayer ( Slice layer ) : void
layer Slice Expected layer id (if not empty)
Результат void

CreateAsync() публичный Метод

Creates a subdirectory with the given path (creating intermediate subdirectories if necessary). An exception is thrown if the given subdirectory already exists.
public CreateAsync ( IFdbTransaction trans, IEnumerable path, Slice layer = default(Slice) ) : Task
trans IFdbTransaction Transaction to use for the operation
path IEnumerable Relative path of the subdirectory to create
layer Slice If is specified, it is recorded with the subdirectory and will be checked by future calls to open.
Результат Task

CreateOrOpenAsync() публичный Метод

Opens a subdirectory with the given path. If the subdirectory does not exist, it is created (creating intermediate subdirectories if necessary).
public CreateOrOpenAsync ( IFdbTransaction trans, IEnumerable path, Slice layer = default(Slice) ) : Task
trans IFdbTransaction Transaction to use for the operation
path IEnumerable Relative path of the subdirectory to create or open
layer Slice If is specified, it is checked against the layer of an existing subdirectory or set as the layer of a new subdirectory.
Результат Task

DumpKey() публичный Метод

public DumpKey ( Slice key ) : string
key Slice
Результат string

ExistsAsync() публичный Метод

Checks if this directory exists
public ExistsAsync ( IFdbReadOnlyTransaction trans ) : Task
trans IFdbReadOnlyTransaction
Результат Task

ExistsAsync() публичный Метод

Checks if a sub-directory exists
public ExistsAsync ( IFdbReadOnlyTransaction trans, IEnumerable path ) : Task
trans IFdbReadOnlyTransaction
path IEnumerable
Результат Task

GetLayerForPath() защищенный Метод

Return the DirectoryLayer instance that should be called for the given path
protected GetLayerForPath ( IFdbTuple relativeLocation ) : FdbDirectoryLayer
relativeLocation IFdbTuple Location relative to this directory subspace
Результат FdbDirectoryLayer

ListAsync() публичный Метод

Returns the list of all the subdirectories of the current directory.
public ListAsync ( IFdbReadOnlyTransaction trans ) : Task>
trans IFdbReadOnlyTransaction
Результат Task>

ListAsync() публичный Метод

Returns the list of all the subdirectories of a sub-directory.
public ListAsync ( IFdbReadOnlyTransaction trans, IEnumerable path ) : Task>
trans IFdbReadOnlyTransaction
path IEnumerable
Результат Task>

MoveToAsync() публичный Метод

Moves the current directory to newAbsolutePath. There is no effect on the physical prefix of the given directory, or on clients that already have the directory open. An error is raised if a directory already exists at `new_path`, or if the new path points to a child of the current directory.
public MoveToAsync ( IFdbTransaction trans, IEnumerable newAbsolutePath ) : Task
trans IFdbTransaction Transaction to use for the operation
newAbsolutePath IEnumerable Full path (from the root) where this directory will be moved
Результат Task

OpenAsync() публичный Метод

Opens a subdirectory with the given path. An exception is thrown if the subdirectory does not exist, or if a layer is specified and a different layer was specified when the subdirectory was created.
public OpenAsync ( IFdbReadOnlyTransaction trans, IEnumerable path, Slice layer = default(Slice) ) : Task
trans IFdbReadOnlyTransaction Transaction to use for the operation
path IEnumerable Relative path of the subdirectory to open
layer Slice If specified, the opened directory must have the same layer id.
Результат Task

RegisterAsync() публичный Метод

Registers an existing prefix as a directory with the given path (creating parent directories if necessary). This method is only indented for advanced use cases.
public RegisterAsync ( IFdbTransaction trans, IEnumerable path, Slice layer, Slice prefix ) : Task
trans IFdbTransaction Transaction to use for the operation
path IEnumerable Path of the directory to create
layer Slice If is specified, it is recorded with the directory and will be checked by future calls to open.
prefix Slice The directory will be created with the given physical prefix; otherwise a prefix is allocated automatically.
Результат Task

RemoveAsync() публичный Метод

Removes the directory, its contents, and all subdirectories. Warning: Clients that have already opened the directory might still insert data into its contents after it is removed.
public RemoveAsync ( IFdbTransaction trans ) : System.Threading.Tasks.Task
trans IFdbTransaction Transaction to use for the operation
Результат System.Threading.Tasks.Task

RemoveAsync() публичный Метод

Removes a sub-directory, its contents, and all subdirectories. Warning: Clients that have already opened the directory might still insert data into its contents after it is removed.
public RemoveAsync ( IFdbTransaction trans, IEnumerable path ) : System.Threading.Tasks.Task
trans IFdbTransaction Transaction to use for the operation
path IEnumerable Path of the sub-directory to remove (relative to this directory)
Результат System.Threading.Tasks.Task

ToRelativePath() защищенный Метод

Convert a path relative to this directory, into a path relative to the root of the current partition
protected ToRelativePath ( IEnumerable path ) : IFdbTuple
path IEnumerable Path relative from this directory
Результат IFdbTuple

ToRelativePath() защищенный Метод

Convert a path relative to this directory, into a path relative to the root of the current partition
protected ToRelativePath ( IFdbTuple location ) : IFdbTuple
location IFdbTuple Path relative from this directory
Результат IFdbTuple

ToString() публичный Метод

Returns a user-friendly description of this directory
public ToString ( ) : string
Результат string

TryCreateAsync() публичный Метод

Creates a subdirectory with the given path (creating intermediate subdirectories if necessary). An exception is thrown if the given subdirectory already exists.
public TryCreateAsync ( IFdbTransaction trans, IEnumerable path, Slice layer = default(Slice) ) : Task
trans IFdbTransaction Transaction to use for the operation
path IEnumerable Relative path of the subdirectory to create
layer Slice If is specified, it is recorded with the subdirectory and will be checked by future calls to open.
Результат Task

TryListAsync() публичный Метод

Returns the list of all the subdirectories of a sub-directory, it it exists.
public TryListAsync ( IFdbReadOnlyTransaction trans ) : Task>
trans IFdbReadOnlyTransaction
Результат Task>

TryListAsync() публичный Метод

Returns the list of all the subdirectories of the current directory, it it exists.
public TryListAsync ( IFdbReadOnlyTransaction trans, IEnumerable path ) : Task>
trans IFdbReadOnlyTransaction
path IEnumerable
Результат Task>

TryMoveToAsync() публичный Метод

Attempts to move the current directory to newPath. There is no effect on the physical prefix of the given directory, or on clients that already have the directory open.
public TryMoveToAsync ( IFdbTransaction trans, IEnumerable newPath ) : Task
trans IFdbTransaction Transaction to use for the operation
newPath IEnumerable Full path (from the root) where this directory will be moved
Результат Task

TryOpenAsync() публичный Метод

Opens a subdirectory with the given path. An exception is thrown if the subdirectory if a layer is specified and a different layer was specified when the subdirectory was created.
public TryOpenAsync ( IFdbReadOnlyTransaction trans, IEnumerable path, Slice layer = default(Slice) ) : Task
trans IFdbReadOnlyTransaction Transaction to use for the operation
path IEnumerable Relative path of the subdirectory to open
layer Slice If specified, the opened directory must have the same layer id.
Результат Task

TryRemoveAsync() публичный Метод

Attempts to remove the directory, its contents, and all subdirectories. Warning: Clients that have already opened the directory might still insert data into its contents after it is removed.
public TryRemoveAsync ( IFdbTransaction trans ) : Task
trans IFdbTransaction Transaction to use for the operation
Результат Task

TryRemoveAsync() публичный Метод

Attempts to remove a sub-directory, its contents, and all subdirectories. Warning: Clients that have already opened the directory might still insert data into its contents after it is removed.
public TryRemoveAsync ( IFdbTransaction trans, IEnumerable path ) : Task
trans IFdbTransaction Transaction to use for the operation
path IEnumerable Path of the sub-directory to remove (relative to this directory)
Результат Task