Class Emulator (2.40.0)

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
Type Description
Emulator
Exceptions
Type Description
IOException

createFromPath(Path path)

public static Emulator createFromPath(Path path)
Parameter
Name Description
path Path
Returns
Type Description
Emulator

Methods

getAdminChannel()

public synchronized ManagedChannel getAdminChannel()
Returns
Type Description
io.grpc.ManagedChannel

getDataChannel()

public synchronized ManagedChannel getDataChannel()
Returns
Type Description
io.grpc.ManagedChannel

getPort()

public synchronized int getPort()
Returns
Type Description
int

start()

public synchronized void start()

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

Exceptions
Type Description
IOException
TimeoutException
InterruptedException

stop()

public synchronized void stop()

Stops the emulator process.