blob: c3ae5c7cc39a9e5cab78c337d5de940133c2eec3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.admin.nodeagent;
/**
* @author freva
*/
public interface NodeAgentContextSupplier {
/**
* Blocks until the next context is ready
* @return context
* @throws ContextSupplierInterruptedException if {@link #interrupt()} was called before this method returned
*/
NodeAgentContext nextContext() throws ContextSupplierInterruptedException;
/** Interrupts the thread(s) currently waiting in {@link #nextContext()} */
void interrupt();
class ContextSupplierInterruptedException extends RuntimeException { }
}
|