org.apache.ignite.internal.processors.igfs

## Class IgfsPathIds

- java.lang.Object
- - org.apache.ignite.internal.processors.igfs.IgfsPathIds

    public class IgfsPathIds
    extends Object

Path IDs abstraction. Contains path and corresponding IDs.

### Constructor Summary

Constructors
Constructor and Description
`IgfsPathIds(IgfsPath path, String[] parts, IgniteUuid[] ids)` Constructor.

### Method Summary

Methods
`void` `addExistingIds(Collection<IgniteUuid> col, boolean relaxed)` Add existing IDs to provided collection.
`void` `addSurrogateIds(Collection<IgniteUuid> col)` Add surrogate IDs to provided collection potentially creating them on demand.
`boolean` `allExists()` Whether all parts exists.
`int` `count()` Get number of elements.
`IgniteUuid` `id(int idx)` Get ID at the give index.
`boolean` `isLastIndex(int idx)` Whether provided index denotes last entry in the path.
`IgniteUuid` `lastExistingId()` Get ID of the last existing entry.
`int` `lastExistingIndex()` Get index of the last existing entry.
`IgfsPath` `lastExistingPath()` Get path of the last existing element.
`boolean` `lastExists()` Whether last entry exists.
`IgniteUuid` `lastId()` Get last ID.
`boolean` `lastParentExists()` Whether parent of the last entry exists.
`IgniteUuid` `lastParentId()` Get last parent ID.
`String` `lastPart()` Get last part of original path.
`IgfsPathIds` `parent()` Get parent entity.
`String` `part(int idx)` Get path part at the given index.
`IgfsPath` `path()` Get original path.
`IgniteUuid` `surrogateId(int idx)` Get surrogate ID at the given index.
`boolean` `verifyIntegrity(Map<IgniteUuid,IgfsEntryInfo> infos, boolean relaxed)` Verify that observed paths are found in provided infos in the right order.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### IgfsPathIds

    public IgfsPathIds(IgfsPath path,
               String[] parts,
               IgniteUuid[] ids)

Constructor.

Parameters:
  `path` - Path.
  `parts` - Path parts.
  `ids` - IDs.

### Method Detail

#### parent

    public IgfsPathIds parent()

Get parent entity.

Returns:
  Parent entity.

#### count

    public int count()

Get number of elements.

Returns:
  ID count.

#### path

    public IgfsPath path()

Get original path.

Returns:
  Path.

#### part

    public String part(int idx)

Get path part at the given index.

Parameters:
  `idx` - Index.
Returns:
  Path part.

#### lastPart

    public String lastPart()

Get last part of original path.

Returns:
  Last part.

#### lastId

    public IgniteUuid lastId()

Get last ID.

Returns:
  Last ID.

#### lastParentId

    @Nullable
    public IgniteUuid lastParentId()

Get last parent ID.

Returns:
  Last parent ID.

#### isLastIndex

    public boolean isLastIndex(int idx)

Whether provided index denotes last entry in the path.

Parameters:
  `idx` - Index.
Returns:
  `True` if last.

#### lastExistingPath

    public IgfsPath lastExistingPath()

Get path of the last existing element.

Returns:
  Path of the last existing element.

#### allExists

    public boolean allExists()

Whether all parts exists.

Returns:
  `True` if all parts were found.

#### lastExists

    public boolean lastExists()

Whether last entry exists.

Returns:
  `True` if exists.

#### lastParentExists

    public boolean lastParentExists()

Whether parent of the last entry exists.

Returns:
  `True` if exists.

#### lastExistingId

    public IgniteUuid lastExistingId()

Get ID of the last existing entry.

Returns:
  ID of the last existing entry.

#### lastExistingIndex

    public int lastExistingIndex()

Get index of the last existing entry.

Returns:
  Index of the last existing entry.

#### addExistingIds

    public void addExistingIds(Collection<IgniteUuid> col,
                      boolean relaxed)

Add existing IDs to provided collection.

Parameters:
  `col` - Collection.
  `relaxed` - Relaxed mode flag.

#### addSurrogateIds

    public void addSurrogateIds(Collection<IgniteUuid> col)

Add surrogate IDs to provided collection potentially creating them on demand.

Parameters:
  `col` - Collection.

#### id

    public IgniteUuid id(int idx)

Get ID at the give index.

Parameters:
  `idx` - Index.
Returns:
  ID.

#### surrogateId

    public IgniteUuid surrogateId(int idx)

Get surrogate ID at the given index.

Parameters:
  `idx` - Index.
Returns:
  Surrogate ID.

#### verifyIntegrity

    public boolean verifyIntegrity(Map<IgniteUuid,IgfsEntryInfo> infos,
                          boolean relaxed)

Verify that observed paths are found in provided infos in the right order.

Parameters:
  `infos` - Info.
  `relaxed` - Whether to perform check in relaxed mode.
Returns:
  `True` if full integrity is preserved.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.9.0
Release Date | : March 2 2017