Encapsulation of a list of items to be processed and possibly a list of failed items to be skipped. To mark an item as skipped clients should iterate over the chunk , and if there is a failure call Remove() on the items list. The skipped items are then available through the chunk. More...
Public Member Functions | |
Chunk () | |
Default constructor. More... | |
Chunk (ICollection< T > items) | |
Custom constructor with a list of items. More... | |
void | Add (T item) |
Adds the item to the chunk. More... | |
void | Clear () |
Clears the items down to signal that we are done. More... | |
void | Skip (Exception e) |
Registers an anonymous skip. To skip an individual item, use ChunkIterator::Remove(). More... | |
bool | IsEmpty () |
int | Size () |
override string | ToString () |
ToString override. More... | |
Properties | |
IList< T > | Items [get] |
List of items property. More... | |
ICollection< Exception > | Errors [get] |
Collection of errors property. More... | |
object | UserData [get, set] |
User data property. More... | |
bool | End [get, set] |
End (of the chunk) flag property. More... | |
bool | Busy [get, set] |
Busy chunk flag property. More... | |
Detailed Description
Encapsulation of a list of items to be processed and possibly a list of failed items to be skipped. To mark an item as skipped clients should iterate over the chunk , and if there is a failure call Remove() on the items list. The skipped items are then available through the chunk.
- Template Parameters
-
T
Constructor & Destructor Documentation
Summer.Batch.Core.Step.Item.Chunk< T >.Chunk | ( | ) |
Default constructor.
Summer.Batch.Core.Step.Item.Chunk< T >.Chunk | ( | ICollection< T > | items | ) |
Custom constructor with a list of items.
- Parameters
-
items
Member Function Documentation
void Summer.Batch.Core.Step.Item.Chunk< T >.Add | ( | T | item | ) |
Adds the item to the chunk.
- Parameters
-
item
void Summer.Batch.Core.Step.Item.Chunk< T >.Clear | ( | ) |
Clears the items down to signal that we are done.
bool Summer.Batch.Core.Step.Item.Chunk< T >.IsEmpty | ( | ) |
- Returns
- true if there are no items in the chunk
int Summer.Batch.Core.Step.Item.Chunk< T >.Size | ( | ) |
- Returns
- the number of items (excluding skips)
void Summer.Batch.Core.Step.Item.Chunk< T >.Skip | ( | Exception | e | ) |
Registers an anonymous skip. To skip an individual item, use ChunkIterator::Remove().
- Parameters
-
e
override string Summer.Batch.Core.Step.Item.Chunk< T >.ToString | ( | ) |
ToString override.
- Returns
Property Documentation
|
getset |
Busy chunk flag property.
|
getset |
End (of the chunk) flag property.
|
get |
Collection of errors property.
|
get |
List of items property.
|
getset |
User data property.
The documentation for this class was generated from the following file:
- Summer.Batch.Core/Core/Step/Item/Chunk.cs