-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk Load CDK: Simply Interface & Add Check #45369
Bulk Load CDK: Simply Interface & Add Check #45369
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
@@ -19,7 +19,9 @@ import kotlinx.coroutines.sync.withLock | |||
* TODO: Some degree of logging/monitoring around how accurate we're actually being? | |||
*/ | |||
@Singleton | |||
class MemoryManager(availableMemoryProvider: AvailableMemoryProvider) { | |||
class MemoryManager( | |||
private val availableMemoryProvider: AvailableMemoryProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused a micronaut bug -- the value wasn't getting injected without val
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah live and learn
@Singleton | ||
@Requires(property = Operation.PROPERTY, value = "check") | ||
@Requires(env = ["destination"]) | ||
class CheckOperation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason why we wouldn't want an abstract class here, with the check() as an abstract function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @Requires
aren't inherited. It would force each implementor to specify the conditions under which their implementation is run.
@@ -19,7 +19,9 @@ import kotlinx.coroutines.sync.withLock | |||
* TODO: Some degree of logging/monitoring around how accurate we're actually being? | |||
*/ | |||
@Singleton | |||
class MemoryManager(availableMemoryProvider: AvailableMemoryProvider) { | |||
class MemoryManager( | |||
private val availableMemoryProvider: AvailableMemoryProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird...
*/ | ||
interface Destination { | ||
interface DestinationWrite { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not in love with the name. DestinationWriteOperation
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NVM, There s a WriteOperation down below. Begs the question why we need both though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment.
suspend fun teardown(succeeded: Boolean = true) {} | ||
} | ||
|
||
@Singleton | ||
@Secondary | ||
class DefaultDestination(private val streamLoaderFactory: StreamLoaderFactory) : Destination { | ||
class DefaultDestinationWrite : DestinationWrite { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need a default that crashes? Might be worth explaining why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't hurt to tell the implementor what's missing 🤷
fa5f5d8
to
8630887
Compare
What