Examples of Connection

  • 2 ends that can be connected to {@link Gate}.
  • A {@link Path} that provides the path from the first end to the last end @author zxpletran007
  • spark.api.Connection
    A connection to a SPARQL processor. Connections can be used to create commands, get metadata, or be closed.
  • sun.rmi.transport.Connection
  • tv.floe.metronome.classification.neuralnetworks.core.Connection
  • vicazh.hyperpool.stream.Connection
    This class is the superclass of all connections @author Victor Zhigunov @version 0.4.8.3

  • Examples of org.tinyuml.draw.Connection

     
      /**
       * Tests adding Connections.
       */
      public void testAddRemoveConnection() {
        Connection conn = new SimpleConnection() {
          public boolean contains(double mx, double my) { return true; }
        };
        diagram.addChild(conn);
        assertEquals(diagram, conn.getParent());
        assertEquals(conn, diagram.getChildAt(6.0, 5.0));
        diagram.removeChild(conn);
        assertEquals(NullElement.getInstance(), diagram.getChildAt(6.0, 5.0));
      }
    View Full Code Here

    Examples of org.voltcore.network.Connection

            final SocketChannel aChannel = (SocketChannel)socketChannelAndInstanceIdAndBuildString[0];
            final long instanceIdWhichIsTimestampAndLeaderIp[] = (long[])socketChannelAndInstanceIdAndBuildString[1];
            final int hostId = (int)instanceIdWhichIsTimestampAndLeaderIp[0];

            NodeConnection cxn = new NodeConnection(instanceIdWhichIsTimestampAndLeaderIp);
            Connection c = m_network.registerChannel( aChannel, cxn);
            cxn.m_connection = c;

            synchronized (this) {

                // If there are no connections, discard any previous connection ids and allow the client
                // to connect to a new cluster.
                // Careful, this is slightly less safe than the previous behavior.
                if (m_connections.size() == 0) {
                    m_clusterInstanceId = null;
                }

                if (m_clusterInstanceId == null) {
                    long timestamp = instanceIdWhichIsTimestampAndLeaderIp[2];
                    int addr = (int)instanceIdWhichIsTimestampAndLeaderIp[3];
                    m_clusterInstanceId = new Object[] { timestamp, addr };
                } else {
                    if (!(((Long)m_clusterInstanceId[0]).longValue() == instanceIdWhichIsTimestampAndLeaderIp[2]) ||
                            !(((Integer)m_clusterInstanceId[1]).longValue() == instanceIdWhichIsTimestampAndLeaderIp[3])) {
                        // clean up the pre-registered voltnetwork connection/channel
                        c.unregister();
                        throw new IOException(
                                "Cluster instance id mismatch. Current is " + m_clusterInstanceId[0] + "," + m_clusterInstanceId[1] +
                                " and server's was " + instanceIdWhichIsTimestampAndLeaderIp[2] + "," + instanceIdWhichIsTimestampAndLeaderIp[3]);
                    }
                }
    View Full Code Here

    Examples of org.voltdb.network.Connection

        protected final void checkForDeadConnections(final long now) {
            if (++tickCounter % 1000 != 0) {
                return;
            }
           
            Connection connectionsToCheck[];
            synchronized (connections) {
                connectionsToCheck = connections.toArray(new Connection[connections.size()]);
            } // SYNCH

            ArrayList<Connection> connectionsToRemove = null;
    View Full Code Here

    Examples of pl.balon.gwt.diagrams.client.connection.Connection

                }
            }

            for ( TransferConnection c : rfcm.getConnections() ) {
                try {
                    Connection connection = RuleFlowConnectionFactory.createConnection( c,
                                                                                        nodes );

                    connections.add( connection );

                    connection.appendTo( this );

                } catch ( Exception e ) {
                    // TODO: handle exception
                }
            }
    View Full Code Here

    Examples of playn.core.Connection

         * retention practices, once the resulting connection is disconnected, the given ones
         * will no longer be referenced and hence will only have their {@code disconnect} method
         * called once (via the returned object).
         */
        public static Connection join (final Connection... connections) {
            return new Connection() {
                @Override public void disconnect () {
                    if (_conns == null) return;
                    for (Connection conn : _conns) conn.disconnect();
                    _conns = null;
                }
    View Full Code Here

    Examples of pushy.internal.Connection

            pushyServer = Runtime.getRuntime().exec(args);

            try
            {
                // Create the connection.
                connection = new Connection(pushyServer.getInputStream(),
                                            pushyServer.getOutputStream());

                // If the address is non-local, create a tunnelled connection.
                if (!address.equals("local:"))
                {
    View Full Code Here

    Examples of redis.clients.jedis.Connection

        private Connection client;

        @Before
        public void setUp() throws Exception {
      client = new Connection();
        }
    View Full Code Here

    Examples of se.despotify.Connection

      }

      @Test
      public void testBrowseTrack() {
        Connection connection = manager.getManagedConnection();
        SpotifyURL.browse("spotify:track:7lF0U328NdKSIPXEOWEpea"new MemoryStore(), connection).accept(new VisitorAdapter() {
          @Override
          public void visit(Track track) {
          }
        });
        connection.close();
      }
    View Full Code Here

    Examples of se.rupy.pool.Connection

        return NO;
      }

      public static long max(short type) throws Exception {
        Connection conn = Sprout.connection(false);
        PreparedStatement stmt = null;
        ResultSet result = null;
        String sql = null;
        try {
          sql = "SELECT count(*) AS count FROM poll WHERE type = " + type;
         
          if(Sprout.SQL.driver().equals("org.postgresql.Driver") ||
              Sprout.SQL.driver().equals("oracle.jdbc.OracleDriver")) {
            sql = "SELECT count(*) AS count FROM poll_table WHERE poll_type = " + type;
          }
         
          stmt = conn.prepareStatement(sql);
          result = stmt.executeQuery();
          if(result.next()) {
            return result.getLong("count");
          }
        } catch(SQLException e) {
          throw e;
        } finally {
          if(result != null) {
            result.close();
          }
          if(stmt != null) {
            stmt.close();
          }
          if(conn != null && conn.getAutoCommit()) {
            conn.close();
          }
        }

        return 0;
      }
    View Full Code Here

    Examples of simtools.diagram.gate.Connection

        protected void disconnectConnectionEnd(){
            CompoundEdit ce = new CompoundEdit();

            if (_elementContainer.getSelection().getShapeCount()==1 &&  _elementContainer.getSelection().getSelectedShape(0) instanceof ConnectionPathSelection){
                ConnectionPathSelection cs = (ConnectionPathSelection)_elementContainer.getSelection().getSelectedShape(0);
                Connection connection = cs.getConnection();

                if( cs.isFirstEndSelected() && connection.getFirstEndGate()!=null ){
                    Gate firstGate = connection.getFirstEndGate()
                    connection.disconnect(firstGate);
                    ce.addEdit(new GateDisconnectEdit(connection, firstGate,true));  

                } else if( cs.isLastEndSelected() && connection.getLastEndGate()!=null  ){
                    Gate lastGate = connection.getLastEndGate()
                    connection.disconnect(lastGate);
                    ce.addEdit(new GateDisconnectEdit(connection, lastGate,false));  
                }
            }

            ce.end();
    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.