C# Class Helios.Buffers.AbstractReferenceCountedByteBuf

An abstract IByteBuf implementation that uses reference counting to protect the underlying data from being overwritten in scenarios where buffers are re-used, sliced, or otherwise shared.
Inheritance: Helios.Buffers.AbstractByteBuf
Afficher le fichier Open project: helios-io/helios

Méthodes publiques

Méthode Description
Release ( ) : bool
Release ( int decrement ) : bool
Retain ( ) : IReferenceCounted
Retain ( int increment ) : IReferenceCounted
Touch ( ) : IReferenceCounted
Touch ( object hint ) : IReferenceCounted

Méthodes protégées

Méthode Description
AbstractReferenceCountedByteBuf ( int maxCapacity ) : System.Diagnostics.Contracts
Deallocate ( ) : void

Called once ReferenceCount is equal to 0.

SetReferenceCount ( int refCount ) : void

An unsafe operation designed to be used by a subclass that sets the reference count of the buffer directly

Method Details

AbstractReferenceCountedByteBuf() protected méthode

protected AbstractReferenceCountedByteBuf ( int maxCapacity ) : System.Diagnostics.Contracts
maxCapacity int
Résultat System.Diagnostics.Contracts

Deallocate() protected abstract méthode

Called once ReferenceCount is equal to 0.
protected abstract Deallocate ( ) : void
Résultat void

Release() public méthode

public Release ( ) : bool
Résultat bool

Release() public méthode

public Release ( int decrement ) : bool
decrement int
Résultat bool

Retain() public méthode

public Retain ( ) : IReferenceCounted
Résultat IReferenceCounted

Retain() public méthode

public Retain ( int increment ) : IReferenceCounted
increment int
Résultat IReferenceCounted

SetReferenceCount() protected méthode

An unsafe operation designed to be used by a subclass that sets the reference count of the buffer directly
protected SetReferenceCount ( int refCount ) : void
refCount int The new value to use.
Résultat void

Touch() public méthode

public Touch ( ) : IReferenceCounted
Résultat IReferenceCounted

Touch() public méthode

public Touch ( object hint ) : IReferenceCounted
hint object
Résultat IReferenceCounted