Class BufferedTokenQueue
A Buffered Queue for a Tokeniser which synchronously buffers a number of Tokens when the Queue is accessed and nothing is Buffered.
Inheritance
System.Object
BufferedTokenQueue
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF.Parsing.Tokens
Assembly: dotNetRDF.dll
Syntax
public class BufferedTokenQueue : TokenQueue, ITokenQueue
Constructors
| Improve this Doc 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
| Improve this Doc View Source_bufferAmount
Variable storing the Buffer Size.
Declaration
protected int _bufferAmount
Field Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc 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
| Improve this Doc View SourceInitialiseBuffer()
Causes the Buffer to be filled using the Default Buffering level of 10.
Declaration
public override void InitialiseBuffer()
Overrides
| Improve this Doc View SourceInitialiseBuffer(Int32)
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 |
---|---|---|
System.Int32 | 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.
|
Improve this Doc
View Source
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. |