org.apache.ignite.internal.processors.cache.persistence.wal

## Class FileWriteAheadLogManager.FileDescriptor

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.FileDescriptor

All Implemented Interfaces:
  Comparable<FileWriteAheadLogManager.FileDescriptor>

Enclosing class:
  FileWriteAheadLogManager

    public static class FileWriteAheadLogManager.FileDescriptor
    extends Object
    implements Comparable<FileWriteAheadLogManager.FileDescriptor>

WAL file descriptor.

### Field Summary

Fields
`protected File` `file`
`protected long` `idx` Absolute WAL segment file index

### Constructor Summary

Constructors
Constructor and Description
`FileWriteAheadLogManager.FileDescriptor(File file)` Creates file descriptor.
`FileWriteAheadLogManager.FileDescriptor(File file, Long idx)`

### Method Summary

Methods
`int` `compareTo(FileWriteAheadLogManager.FileDescriptor o)`
`boolean` `equals(Object o)`
`static String` `fileName(long segment)`
`String` `getAbsolutePath()`
`long` `getIdx()`
`int` `hashCode()`

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

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

### Field Detail

#### file

    protected final File file

#### idx

    protected final long idx

Absolute WAL segment file index

### Constructor Detail

#### FileWriteAheadLogManager.FileDescriptor

    public FileWriteAheadLogManager.FileDescriptor(@NotNull
                                           File file)

Creates file descriptor. Index is restored from file name

Parameters:
  `file` - WAL segment file.

#### FileWriteAheadLogManager.FileDescriptor

    public FileWriteAheadLogManager.FileDescriptor(@NotNull
                                           File file,
                                           @Nullable
                                           Long idx)

Parameters:
  `file` - WAL segment file.
  `idx` - Absolute WAL segment file index. For null value index is restored from file name

### Method Detail

#### fileName

    public static String fileName(long segment)

Parameters:
  `segment` - Segment index.
Returns:
  Segment file name.

#### compareTo

    public int compareTo(FileWriteAheadLogManager.FileDescriptor o)

Specified by:
  `compareTo` in interface `Comparable<FileWriteAheadLogManager.FileDescriptor>`

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### getIdx

    public long getIdx()

Returns:
  Absolute WAL segment file index

#### getAbsolutePath

    public String getAbsolutePath()

Returns:
  absolute pathname string of this file descriptor pathname.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017