org.apache.ignite.internal.processors.igfs

## Class IgfsClientSession

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

    public class IgfsClientSession
    extends Object

IGFS client session. Effectively used to manage lifecycle of opened resources and close them on connection close.

### Constructor Summary

Constructors
Constructor and Description
`IgfsClientSession()`

### Method Summary

Methods
`Iterator<Closeable>` `registeredResources()`
`boolean` `registerResource(long rsrcId, Closeable rsrc)` Registers resource within this session.
`<T> T` `resource(Long rsrcId)` Gets registered resource by ID.
`boolean` `unregisterResource(Long rsrcId, Closeable rsrc)` Unregister previously registered resource.

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

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

### Constructor Detail

#### IgfsClientSession

    public IgfsClientSession()

### Method Detail

#### registerResource

    public boolean registerResource(long rsrcId,
                           Closeable rsrc)

Registers resource within this session.

Parameters:
  `rsrcId` - Resource id.
  `rsrc` - Resource to register.

#### resource

    @Nullable
    public <T> T resource(Long rsrcId)

Gets registered resource by ID.

Parameters:
  `rsrcId` - Resource ID.
Returns:
  Resource or `null` if resource was not found.

#### unregisterResource

    public boolean unregisterResource(Long rsrcId,
                             Closeable rsrc)

Unregister previously registered resource.

Parameters:
  `rsrcId` - Resource ID.
  `rsrc` - Resource to unregister.
Returns:
  `True` if resource was unregistered, `false` if no resource is associated with this ID or other resource is associated with this ID.

#### registeredResources

    public Iterator<Closeable> registeredResources()

Returns:
  Registered resources iterator.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.2.0
Release Date | : September 15 2017