Class Emulator (2.35.1)

public class Emulator

Wraps the Bigtable emulator in a java api and decorates it with grpc channel builders.

This class will use the golang binaries embedded in this jar to launch the emulator as an external process and redirect its output to a Logger.

Inheritance

java.lang.Object > Emulator

Static Methods

createBundled()

public static Emulator createBundled()

Create a new instance of emulator. The emulator will use the bundled binaries in this jar. Please note that the emulator is created in a stopped state, please use #start() after creating it.

Returns
TypeDescription
Emulator
Exceptions
TypeDescription
IOException

createFromPath(Path path)

public static Emulator createFromPath(Path path)
Parameter
NameDescription
pathPath
Returns
TypeDescription
Emulator

Methods

getAdminChannel()

public synchronized ManagedChannel getAdminChannel()
Returns
TypeDescription
io.grpc.ManagedChannel

getDataChannel()

public synchronized ManagedChannel getDataChannel()
Returns
TypeDescription
io.grpc.ManagedChannel

getPort()

public synchronized int getPort()
Returns
TypeDescription
int

start()

public synchronized void start()

Starts the emulator process and waits for it to be ready.

Exceptions
TypeDescription
IOException
TimeoutException
InterruptedException

stop()

public synchronized void stop()

Stops the emulator process.