Examples of ConnectionSpec


Examples of javax.resource.cci.ConnectionSpec

   * using it if available, falling back to the statically specified
   * "connectionSpec" property else.
   * @see #doGetConnection
   */
  public final Connection getConnection() throws ResourceException {
    ConnectionSpec threadSpec = (ConnectionSpec) this.threadBoundSpec.get();
    if (threadSpec != null) {
      return doGetConnection(threadSpec);
    }
    else {
      return doGetConnection(this.connectionSpec);
View Full Code Here

Examples of javax.resource.cci.ConnectionSpec

   * "connectionSpec" property else.
   * @see #doGetConnection
   */
  @Override
  public final Connection getConnection() throws ResourceException {
    ConnectionSpec threadSpec = this.threadBoundSpec.get();
    if (threadSpec != null) {
      return doGetConnection(threadSpec);
    }
    else {
      return doGetConnection(this.connectionSpec);
View Full Code Here

Examples of javax.resource.cci.ConnectionSpec

    Record inputRecord = (Record) inputRecordControl.getMock();
    MockControl outputRecordControl = MockControl.createStrictControl(Record.class);
    Record outputRecord = (Record) outputRecordControl.getMock();

    MockControl connectionSpecControl = MockControl.createStrictControl(ConnectionSpec.class);
    ConnectionSpec connectionSpec = (ConnectionSpec) connectionSpecControl.getMock();
    MockControl interactionSpecControl = MockControl.createStrictControl(InteractionSpec.class);
    InteractionSpec interactionSpec = (InteractionSpec) interactionSpecControl.getMock();

    connectionFactory.getConnection(connectionSpec);
    connectionFactoryControl.setReturnValue(connection, 1);
View Full Code Here

Examples of javax.resource.cci.ConnectionSpec

  }

  @Test
  public void testTemplateExecuteInputOutputConnectionSpec() throws ResourceException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    ConnectionSpec connectionSpec = mock(ConnectionSpec.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);

    Record inputRecord = mock(Record.class);
    Record outputRecord = mock(Record.class);
View Full Code Here

Examples of javax.resource.cci.ConnectionSpec

   * "connectionSpec" property else.
   * @see #doGetConnection
   */
  @Override
  public final Connection getConnection() throws ResourceException {
    ConnectionSpec threadSpec = this.threadBoundSpec.get();
    if (threadSpec != null) {
      return doGetConnection(threadSpec);
    }
    else {
      return doGetConnection(this.connectionSpec);
View Full Code Here

Examples of org.jredis.connector.ConnectionSpec

  }

  @Override
  public void run() {
    int database = 11;
    ConnectionSpec connSpec = DefaultConnectionSpec.newSpec("localhost", 6379, database, "jredis".getBytes());
    JRedisFuture jredis = new JRedisChunkedPipeline(connSpec);
   
    byte[] key = "cpct".getBytes();
    int iters = 100000;
   
View Full Code Here

Examples of org.jredis.connector.ConnectionSpec

    }
  }

  private void run() throws RedisException {
    int database = 11;
    ConnectionSpec connSpec = DefaultConnectionSpec.newSpec("localhost", 6379, database, "jredis".getBytes());
    JRedis jredis = new JRedisClient(connSpec);
   
    byte[] key = "bench-jredis-pipeline-key".getBytes();
    int iters = 100 * 1000;
   
 
View Full Code Here

Examples of org.jredis.connector.ConnectionSpec

    new SimpleBenchJRedisPipeline().run();
  }

  private void run() {
    int database = 11;
    ConnectionSpec connSpec = DefaultConnectionSpec.newSpec("localhost", 6379, database, "jredis".getBytes());
    JRedisFuture jredis = new JRedisPipeline(connSpec);
   
    byte[] key = "pipe".getBytes();
    int iters = 100 * 1000;
   
 
View Full Code Here

Examples of org.jredis.connector.ConnectionSpec

    InetAddress   address = null;
    Connection     synchConnection = null;
    try {
     
      address = InetAddress.getByName(host);
      ConnectionSpec spec = DefaultConnectionSpec.newSpec(address, port, database, credentials);
      synchConnection = createSynchConnection(spec, isShared, redisVersion);
      Assert.notNull(synchConnection, "connection delegate", ClientRuntimeException.class);
    }
    catch (UnknownHostException e) {
      String msg = "Couldn't obtain InetAddress for "+host;
View Full Code Here

Examples of org.jredis.connector.ConnectionSpec

    new SimpleBenchJRedisAsync().run();
  }

  private void run() {
    int database = 11;
    ConnectionSpec connSpec = DefaultConnectionSpec.newSpec("localhost", 6379, database, "jredis".getBytes());
    JRedisFuture jredis = new JRedisAsyncClient(connSpec);
   
    byte[] key = "bench-jredis-pipeline-key".getBytes();
    int iters = 100 * 1000;
   
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.