public class CorfuRuntime extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CorfuRuntime.CorfuRuntimeParameters
A class which holds parameters and settings for the
CorfuRuntime . |
Modifier and Type | Field and Description |
---|---|
UUID |
clusterId
The
UUID of the cluster we are currently connected to, or null, if
there is no cluster yet. |
CompletableFuture<Layout> |
layout
A completable future containing a layout, when completed.
|
static BiFunction<CorfuRuntime,String,IClientRouter> |
overrideGetRouterFunction
When set, overrides the default getRouterFunction.
|
Constructor and Description |
---|
CorfuRuntime()
Deprecated.
|
CorfuRuntime(String configurationString)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
CorfuRuntime |
addLayoutServer(String layoutServer)
Add a layout server to the list of servers known by the CorfuRuntime.
|
CorfuRuntime |
connect()
Connect to the Corfu server instance.
|
CorfuRuntime |
enableSaslPlainText(String usernameFile,
String passwordFile)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
CorfuRuntime |
enableTls(String keyStore,
String ksPasswordFile,
String trustStore,
String tsPasswordFile)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
static CorfuRuntime |
fromParameters(CorfuRuntime.CorfuRuntimeParameters parameters)
Factory method for generating new
CorfuRuntime s given a set of
CorfuRuntime.CorfuRuntimeParameters to configure the runtime with. |
static UUID |
getCheckpointStreamIdFromId(UUID streamId) |
static UUID |
getCheckpointStreamIdFromName(String streamName) |
IClientRouter |
getRouter(String address)
Get a router, given the address.
|
static UUID |
getStreamID(String string)
Get a UUID for a named stream.
|
static String |
getVersionString()
Get corfu runtime version.
|
void |
invalidateLayout()
Invalidate the current layout.
|
CorfuRuntime |
parseConfigurationString(String configurationString)
Parse a configuration string and get a CorfuRuntime.
|
CorfuRuntime |
registerBeforeRpcHandler(Runnable handler)
Deprecated.
|
CorfuRuntime |
registerSystemDownHandler(Runnable handler)
Deprecated.
|
CorfuRuntime |
setBackpointersDisabled(boolean disable)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
CorfuRuntime |
setBulkReadSize(int size)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
CorfuRuntime |
setCacheDisabled(boolean disable)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
CorfuRuntime |
setCacheExpiryTime(int expiryTime)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
CorfuRuntime |
setHoleFillingDisabled(boolean disable)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
CorfuRuntime |
setLoadSmrMapsAtConnect(boolean enable)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
CorfuRuntime |
setNumCacheEntries(long numCacheEntries)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
CorfuRuntime |
setTimeoutInMinutesForFastLoading(int timeout)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
CorfuRuntime |
setTransactionLogging(boolean enable)
If enabled, successful transactions will be written to a special transaction stream
(i.e.
|
CorfuRuntime |
setTrimRetry(int trimRetry)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
CorfuRuntime |
setWriteRetry(int writeRetry)
Deprecated.
Deprecated, set using
CorfuRuntime.CorfuRuntimeParameters instead. |
void |
shutdown()
Shuts down the CorfuRuntime.
|
void |
stop()
Stop all routers associated with this runtime & disconnect them.
|
void |
stop(boolean shutdown)
Stop all routers associated with this Corfu Runtime.
|
public volatile CompletableFuture<Layout> layout
public volatile UUID clusterId
UUID
of the cluster we are currently connected to, or null, if
there is no cluster yet.public static BiFunction<CorfuRuntime,String,IClientRouter> overrideGetRouterFunction
@Deprecated public CorfuRuntime()
fromParameters(CorfuRuntimeParameters)
@Deprecated public CorfuRuntime(String configurationString)
fromParameters(CorfuRuntimeParameters)
configurationString
- The configuration string to parse.@Deprecated public CorfuRuntime registerSystemDownHandler(Runnable handler)
handler
- Handler to invoke in case of system Down.@Deprecated public CorfuRuntime registerBeforeRpcHandler(Runnable handler)
handler
- Handler to invoke before every RPC.public static CorfuRuntime fromParameters(@Nonnull CorfuRuntime.CorfuRuntimeParameters parameters)
CorfuRuntime
s given a set of
CorfuRuntime.CorfuRuntimeParameters
to configure the runtime with.parameters
- A CorfuRuntime.CorfuRuntimeParameters
to use.CorfuRuntime
.public void shutdown()
public void stop()
public void stop(boolean shutdown)
public static UUID getStreamID(String string)
string
- The name of the stream.public static String getVersionString()
public CorfuRuntime setTransactionLogging(boolean enable)
enable
- indicates if transaction logging is enabledpublic CorfuRuntime parseConfigurationString(String configurationString)
configurationString
- The configuration string to parse.public CorfuRuntime addLayoutServer(String layoutServer)
layoutServer
- A layout server to use.public IClientRouter getRouter(String address)
address
- The address of the router to get.public void invalidateLayout()
public CorfuRuntime connect()
@Deprecated public CorfuRuntime enableTls(String keyStore, String ksPasswordFile, String trustStore, String tsPasswordFile)
CorfuRuntime.CorfuRuntimeParameters
instead.@Deprecated public CorfuRuntime enableSaslPlainText(String usernameFile, String passwordFile)
CorfuRuntime.CorfuRuntimeParameters
instead.@Deprecated public CorfuRuntime setBackpointersDisabled(boolean disable)
CorfuRuntime.CorfuRuntimeParameters
instead.disable
- True, if the cache should be disabled, false otherwise.@Deprecated public CorfuRuntime setCacheDisabled(boolean disable)
CorfuRuntime.CorfuRuntimeParameters
instead.disable
- True, if the cache should be disabled, false otherwise.@Deprecated public CorfuRuntime setLoadSmrMapsAtConnect(boolean enable)
CorfuRuntime.CorfuRuntimeParameters
instead.enable
- True, if the fast loader should be used, false otherwise.@Deprecated public CorfuRuntime setHoleFillingDisabled(boolean disable)
CorfuRuntime.CorfuRuntimeParameters
instead.disable
- True, if hole filling should be disabled@Deprecated public CorfuRuntime setNumCacheEntries(long numCacheEntries)
CorfuRuntime.CorfuRuntimeParameters
instead.numCacheEntries
- The number of cache entries.@Deprecated public CorfuRuntime setCacheExpiryTime(int expiryTime)
CorfuRuntime.CorfuRuntimeParameters
instead.expiryTime
- The time before cache expiration, in seconds.@Deprecated public CorfuRuntime setBulkReadSize(int size)
CorfuRuntime.CorfuRuntimeParameters
instead.size
- The bulk read size.@Deprecated public CorfuRuntime setWriteRetry(int writeRetry)
CorfuRuntime.CorfuRuntimeParameters
instead.writeRetry
- The number of times to retry writes.@Deprecated public CorfuRuntime setTrimRetry(int trimRetry)
CorfuRuntime.CorfuRuntimeParameters
instead.trimRetry
- The number of times to retry on trims.@Deprecated public CorfuRuntime setTimeoutInMinutesForFastLoading(int timeout)
CorfuRuntime.CorfuRuntimeParameters
instead.timeout
- The number of minutes to wait.Copyright © 2019 CorfuDB. All rights reserved.