abstract class ProcessingManifest[F[_]] extends AnyRef
Base trait for processing manifest functionality
- F
effect producing by interaction with manifest
- Alphabetic
- By Inheritance
- ProcessingManifest
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ProcessingManifest(resolver: Resolver[F])(implicit F: ManifestAction[F])
Abstract Value Members
- abstract def fetch(processedBy: Option[Application], state: Option[State])(implicit F: ManifestAction[F], S: Sync[F]): Stream[F, ItemId]
-
abstract
def
getItem(id: ItemId): F[Option[Item]]
Get state of single item, with validating state of
Item -
abstract
def
put(itemId: ItemId, app: Application, previousRecordId: Option[UUID], state: State, author: Option[Agent], payload: Option[Payload]): F[(UUID, Instant)]
Add an atomic record to manifest
-
abstract
def
stream(implicit S: Sync[F]): Stream[F, Record]
Get full manifest
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getUnprocessed(itemIds: Stream[F, ItemId], predicate: (Item) ⇒ Boolean)(implicit S: Sync[F]): F[List[Item]]
Get items from collection of ids that: + were processed by
preprocessorapplication + were NOT yet processed by specifiedapplication+ matchpredicatefunction + not in "blocked" or "failed" stateGet items from collection of ids that: + were processed by
preprocessorapplication + were NOT yet processed by specifiedapplication+ matchpredicatefunction + not in "blocked" or "failed" state- predicate
filter function to get only valid
Items, e.g. containing particular payload
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
processAll(app: Application, predicate: (Item) ⇒ Boolean, acquirePayload: Option[Payload], process: Process)(implicit S: Sync[F]): F[Unit]
Apply
Processfunction to all items unprocessed byappFor each item, lock will be held.Apply
Processfunction to all items unprocessed byappFor each item, lock will be held. If any of items already holding a lock, function breaks immediately -
def
processItem(app: Application, acquirePayload: Option[Payload], process: Process)(item: Item): F[(UUID, Instant)]
Acquire lock, apply processing function and write its result back to manifest
-
def
processNewItem(id: ItemId, app: Application, acquirePayload: Option[Payload], process: ProcessNew): F[Unit]
Similar to
processItem, but works without existingItem, instead it creates new one itself or queries it by knownidShould be used whenappis both adding item to manifest and processes it straight afterwardsSimilar to
processItem, but works without existingItem, instead it creates new one itself or queries it by knownidShould be used whenappis both adding item to manifest and processes it straight afterwards- id
new item id, which should be either fetched or created
- app
application doing discovering and processing
- acquirePayload
optional payload that will be added as part of
Processing, can be e.g. notification thatappstarted to process it with some special configuration (cross-batch dedupe enabled)- process
Process that does not expect existing item
-
def
query(preparedBy: Option[Application], requester: Option[Application])(implicit S: Sync[F]): Stream[F, ItemId]
Get ids of items that were processed by
processedByand NOT processed byapplicationMost common kind of query for Processing Manifest. - val resolver: Resolver[F]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )