MetaStreams

sec.api.MetaStreams
See theMetaStreams companion object
trait MetaStreams[F[_]]

API for interacting with metadata streams in EventStoreDB.

Methods for getting, setting and unsetting metadata for streams.

Attributes

F

the effect type in which MetaStreams operates.

Companion:
object
Source:
metastreams.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

Gets the access control list for a stream.

Gets the access control list for a stream.

Attributes

id

the id of the stream.

Returns:

an optional result for the metadata stream containing current StreamPosition for the metadata stream and the StreamAcl value.

Source:
metastreams.scala

Gets the cache control for a stream.

Gets the cache control for a stream.

Attributes

id

the id of the stream.

Returns:

an optional result for the metadata stream containing current StreamPosition for the metadata stream and the CacheControl value.

Source:
metastreams.scala
def getCustom[T : Decoder](id: Id): F[Option[ReadResult[T]]]

Gets a custom JSON encoded metadata value for a stream using a provided decoder.

Gets a custom JSON encoded metadata value for a stream using a provided decoder.

Attributes

id

the id of the stream.

Returns:

an optional result for the metadata stream containing current StreamPosition for the metadata stream and a JSON value using the provided io.circe.Decoder decoder.

Source:
metastreams.scala

Gets the max age for a stream.

Gets the max age for a stream.

Attributes

id

the id of the stream.

Returns:

an optional result for the metadata stream containing current StreamPosition for the metadata stream and the MaxAge value.

Source:
metastreams.scala

Gets the max count for a stream.

Gets the max count for a stream.

Attributes

id

the id of the stream.

Returns:

an optional result for the metadata stream containing current StreamPosition for the metadata stream and the MaxCount value.

Source:
metastreams.scala

Gets the StreamPosition value that a stream is truncated before.

Gets the StreamPosition value that a stream is truncated before.

Attributes

id

the id of the stream.

Returns:

an optional result for the metadata stream containing current StreamPosition for the metadata stream and the StreamPosition truncate before value.

Source:
metastreams.scala
def setAcl(id: Id, expectedState: StreamState, acl: StreamAcl): F[WriteResult]

Sets StreamAcl for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Sets StreamAcl for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

acl

the access control list for the stream.

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

Source:
metastreams.scala
def setCacheControl(id: Id, expectedState: StreamState, cacheControl: CacheControl): F[WriteResult]

Sets CacheControl for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Sets CacheControl for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

cacheControl

the cache control for the stream.

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

Source:
metastreams.scala
def setCustom[T : AsObject](id: Id, expectedState: StreamState, custom: T): F[WriteResult]

Sets a custom JSON metadata value for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Sets a custom JSON metadata value for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

custom

the custom JSON value using the provided io.circe.Encoder.AsObject encoder.

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

Source:
metastreams.scala
def setMaxAge(id: Id, expectedState: StreamState, age: MaxAge): F[WriteResult]

Sets MaxAge for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Sets MaxAge for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

age

the max age for data in the stream.

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

Source:
metastreams.scala
def setMaxCount(id: Id, expectedState: StreamState, count: MaxCount): F[WriteResult]

Sets MaxCount for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Sets MaxCount for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

count

the max count of data in the stream.

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

Source:
metastreams.scala
def setTruncateBefore(id: Id, expectedState: StreamState, truncateBefore: Exact): F[WriteResult]

Sets StreamPosition truncated value for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Sets StreamPosition truncated value for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

truncateBefore

the truncated before stream position for the stream, the value used entails that events with a stream position less than the truncated before value should be removed.

Source:
metastreams.scala
def unsetAcl(id: Id, expectedState: StreamState): F[WriteResult]

Removes StreamAcl for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Removes StreamAcl for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

Source:
metastreams.scala
def unsetCacheControl(id: Id, expectedState: StreamState): F[WriteResult]

Removes CacheControl for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Removes CacheControl for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

Source:
metastreams.scala
def unsetCustom(id: Id, expectedState: StreamState): F[WriteResult]

Removes custom JSON metadata value for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Removes custom JSON metadata value for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

Note:

Removing custom JSON metadata does not affect other metadata values.

Source:
metastreams.scala
def unsetMaxAge(id: Id, expectedState: StreamState): F[WriteResult]

Removes MaxAge for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Removes MaxAge for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

Source:
metastreams.scala
def unsetMaxCount(id: Id, expectedState: StreamState): F[WriteResult]

Removes MaxCount for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Removes MaxCount for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

Source:
metastreams.scala
def unsetTruncateBefore(id: Id, expectedState: StreamState): F[WriteResult]

Removes StreamPosition truncated value for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Removes StreamPosition truncated value for a stream and returns WriteResult with current positions of the stream after a successful operation. Failure to fulfill the expected state is manifested by raising sec.api.exceptions.WrongExpectedState.

Attributes

expectedState

the state that the stream is expected to in. See StreamState for details.

id

the id of the stream.

Source:
metastreams.scala

Returns an instance that uses provided UserCredentials. This is useful when an operation requires different credentials from what is provided through configuration.

Returns an instance that uses provided UserCredentials. This is useful when an operation requires different credentials from what is provided through configuration.

Attributes

creds

Custom user credentials to use.

Source:
metastreams.scala