Class Array<T>
A memory mapped array for elements of fixed size.
Inherited Members
Namespace: Mars.Common.IO.Mapped.Arrays
Assembly: Mars.IO.dll
Syntax
public class Array<T> : ArrayBase<T>, ISerializableToStream, IEnumerable<T>
Type Parameters
Name | Description |
---|---|
T |
Constructors
Array(MappedAccessor<T>, Int32, Int32)
Creates a memory mapped array based on existing data.
Declaration
public Array(MappedAccessor<T> accessor, int bufferSize = null, int cacheSize = null)
Parameters
Type | Name | Description |
---|---|---|
MappedAccessor<T> | accessor | |
System.Int32 | bufferSize | |
System.Int32 | cacheSize |
Array(MemoryMap, Int64, ArrayProfile)
Creates a memory mapped array.
Declaration
public Array(MemoryMap map, long length, ArrayProfile profile)
Parameters
Type | Name | Description |
---|---|---|
MemoryMap | map | |
System.Int64 | length | |
ArrayProfile | profile |
Array(MemoryMap, Int64, Int64, Int32, Int32)
Creates a memory mapped array.
Declaration
public Array(MemoryMap map, long length, long accessorSize = null, int bufferSize = 1024, int cacheSize = 32)
Parameters
Type | Name | Description |
---|---|---|
MemoryMap | map | |
System.Int64 | length | |
System.Int64 | accessorSize | |
System.Int32 | bufferSize | |
System.Int32 | cacheSize |
Properties
CanResize
Returns true if this array can be resized.
Declaration
public override bool CanResize { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<T>.CanResize
Item[Int64]
Returns the element at the given index.
Declaration
public override sealed T this[long idx] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | idx |
Property Value
Type | Description |
---|---|
T |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<T>.Item[System.Int64]
Length
Returns the length of this array.
Declaration
public override sealed long Length { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<T>.Length
Methods
Dispose()
Dispose of all native resource associated with this array.
Declaration
public override sealed void Dispose()
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<T>.Dispose()
Resize(Int64)
Resizes this array.
Declaration
public override sealed void Resize(long size)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | size |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<T>.Resize(System.Int64)
Implements
IEnumerable<>