Class BufferedTokenQueue
A Buffered Queue for a Tokeniser which synchronously buffers a number of Tokens when the Queue is accessed and nothing is Buffered.
Implements
Inherited Members
Namespace: VDS.RDF.Parsing.Tokens
Assembly: dotNetRdf.dll
Syntax
public class BufferedTokenQueue : TokenQueue, ITokenQueue
Constructors
| Edit this page View SourceBufferedTokenQueue()
Creates a new Buffered Queue.
Declaration
public BufferedTokenQueue()
BufferedTokenQueue(ITokeniser)
Creates a new Buffered Queue for the given Tokeniser.
Declaration
public BufferedTokenQueue(ITokeniser tokeniser)
Parameters
Type | Name | Description |
---|---|---|
ITokeniser | tokeniser | Tokeniser to Buffer. |
Fields
| Edit this page View Source_bufferAmount
Variable storing the Buffer Size.
Declaration
protected int _bufferAmount
Field Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceBufferInternal()
Internal Helper Method which performs the Buffering.
Declaration
protected virtual void BufferInternal()
Dequeue()
Gets the next Token in the Queue and removes it from the Queue.
Declaration
public override IToken Dequeue()
Returns
Type | Description |
---|---|
IToken | Token at the front of the Queue. |
Overrides
| Edit this page View SourceInitialiseBuffer()
Causes the Buffer to be filled using the Default Buffering level of 10.
Declaration
public override void InitialiseBuffer()
Overrides
| Edit this page View SourceInitialiseBuffer(int)
Causes the Buffer to be filled and sets the Buffering level for the Queue.
Declaration
public override void InitialiseBuffer(int amount)
Parameters
Type | Name | Description |
---|---|---|
int | amount | Number of Tokens to Buffer. |
Overrides
Remarks
If a Buffer amount of less than zero is given then Buffer size will stay at default size (10) or existing size if it's previously been set.
Peek()
Gets the next Token in the Queue without removing it from the Queue.
Declaration
public override IToken Peek()
Returns
Type | Description |
---|---|
IToken | Token at the front of the Queue. |