object LockHandler extends Serializable
- Alphabetic
- By Inheritance
- LockHandler
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
type
PutFunction[F[_], A] = (Application, Item, UUID, A) ⇒ F[(UUID, Instant)]
Wrapper for function that performs
putand can add some payload ofA
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
-
def
Default[F[_]](manifest: ProcessingManifest[F]): LockHandler[F]
Default handler, adding
Processingfor acquire andProcessedfor release -
def
acquire[F[_]](manifest: ProcessingManifest[F])(app: Application, item: Item, payload: Option[Payload]): F[(UUID, Instant)]
Acquire lock by adding
Processingstate to theItemOnly processing-apps should acquire lock (no snowplowctl)Acquire lock by adding
Processingstate to theItemOnly processing-apps should acquire lock (no snowplowctl)It performs two Item-checks: one *before* acquiring lock, to check that application is still working with unchanged item (some time might pass since we received
Item- it even could happen in batch); one *after* acquiring lock, to check that meanwhileput-request was sent no other application attempted to write to this item It acquires lock for particular application, but will also fail because of "race condition" if any other application attempted to write- app
application that tries to acquire lock
- item
original unprocessed item, from batch of
items- payload
payload that will be add to
Processingrecord- returns
time of adding
ProcessingwithinMonadErroreffect, telling if acquisition was successful
-
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
fail[F[_]](manifest: ProcessingManifest[F])(app: Application, item: Item, previous: UUID, throwable: Throwable): F[(UUID, Instant)]
Helper to mark
ItemasFailed(putFailed) -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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()
-
final
def
release[F[_]](manifest: ProcessingManifest[F])(app: Application, item: Item, previous: UUID, payload: Option[Payload]): F[(UUID, Instant)]
Helper to release lock (put
Processed) -
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( ... )