public synchronized void attach ( SlabRef slab ) { // Assume ownership of the caller's ref. No need to call slab.addRef(). checkState ( ! isAttached ( ) ) ; _slab = slab ; _slabConsumed = 0 ; _slabBytesConsumed = 0 ; _slabExpiresAt = System . currentTimeMillis ( ) + Constants . SLAB_ROTATE_TTL . toMillis ( ) ; }
Attaches a new slab to the channel with the specified capacity .