Example usage for org.apache.cassandra.config DatabaseDescriptor startNativeTransport

List of usage examples for org.apache.cassandra.config DatabaseDescriptor startNativeTransport

Introduction

In this page you can find the example usage for org.apache.cassandra.config DatabaseDescriptor startNativeTransport.

Prototype

public static boolean startNativeTransport() 

Source Link

Usage

From source file:org.wildfly.extension.cassandra.WildflyCassandraDaemon.java

License:Apache License

/**
 * Start the Cassandra Daemon, assuming that it has already been
 * initialized via {@link #init(String[])}
 *
 * Hook for JSVC//from   www  .  j a  va2s.  com
 */
public void start() {
    String nativeFlag = System.getProperty("cassandra.start_native_transport");
    if ((nativeFlag != null && Boolean.parseBoolean(nativeFlag))
            || (nativeFlag == null && DatabaseDescriptor.startNativeTransport()))
        nativeServer.start();
    else
        CassandraLogger.LOGGER.infof(
                "Not starting native transport as requested. Use JMX (StorageService->startNativeTransport()) or nodetool (enablebinary) to start it");

    String rpcFlag = System.getProperty("cassandra.start_rpc");
    if ((rpcFlag != null && Boolean.parseBoolean(rpcFlag))
            || (rpcFlag == null && DatabaseDescriptor.startRpc()))
        thriftServer.start();
    else
        CassandraLogger.LOGGER.infof(
                "Not starting RPC server as requested. Use JMX (StorageService->startRPCServer()) or nodetool (enablethrift) to start it");
}