org.apache.ignite.internal.binary

## Class BinaryContextHolder

- java.lang.Object
- - org.apache.ignite.internal.binary.BinaryContextHolder

    public class BinaryContextHolder
    extends Object

Binary context holder. We use to avoid `ThreadLocal.clear()` and/or {{}}ThreadLocal.set()}} operations on every serialization/deserialization, as they may take considerable amount of CPU time (confirmed by benchmarks).

### Constructor Summary

Constructors
Constructor and Description
`BinaryContextHolder()`

### Method Summary

All Methods Instance Methods Concrete Methods
`@Nullable BinaryContext` `get()`
`@Nullable BinaryContext` `set(@Nullable BinaryContext newCtx)`

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

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

### Constructor Detail

#### BinaryContextHolder

    public BinaryContextHolder()

### Method Detail

#### get

    @Nullable
    public @Nullable BinaryContext get()

Returns:
  Context.

#### set

    @Nullable
    public @Nullable BinaryContext set(@Nullable
                                                 @Nullable BinaryContext newCtx)

Parameters:
  `newCtx` - New context.
Returns:
  Previous context.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023