Examples of resetState()


Examples of com.torrent4j.model.peer.TorrentPeer.resetState()

            .get(PeerTrafficShapingHandler.class).setPeer(peer);
        e.getChannel().getPipeline()
            .get(TorrentTrafficShapingHandler.class)
            .setTorrent(torrent);

        peer.resetState();
        this.peer.getStrategy().getPeerStrategy()
            .peerConnected(torrent, peer);
      } else if (msg instanceof HaveMessage) {
        peer.getTorrentPeer()
            .getPieces()
View Full Code Here

Examples of jcgp.backend.population.Connection.resetState()

            // note that the old connection may still have locks after this
            parent.getGuiGene(source.getChangingConnection()).removeLocks(source.getLocks());
            addLocks(source.getLocks());
          } else {
            if (source instanceof GUIOutput) {
              source.resetState();
            }
          }
          source.setChangingConnection(node);

        }
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.AssertEventCatcher.resetState()

        cs1.setReadOnly(true);
        setHoldability(cs1, true); // hold
        //Confirm - no connection closed event & connection error event
        assertFalse(aes6.didConnectionClosedEventHappen());
        assertFalse(aes6.didConnectionErrorEventHappen());
        aes6.resetState();
        cs1.close();
        //Check if got connection closed event but not connection error event
        assertTrue(aes6.didConnectionClosedEventHappen());
        assertFalse(aes6.didConnectionErrorEventHappen());
        aes6.resetState();
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.AssertEventCatcher.resetState()

        aes6.resetState();
        cs1.close();
        //Check if got connection closed event but not connection error event
        assertTrue(aes6.didConnectionClosedEventHappen());
        assertFalse(aes6.didConnectionErrorEventHappen());
        aes6.resetState();
       
        cs1 = xac.getConnection();
        // new handle - local
        assertConnectionState(
            ResultSet.HOLD_CURSORS_OVER_COMMIT,
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.AssertEventCatcher.resetState()

            true, false, cs1);
        cs1.close();
        //Check if got connection closed event but not connection error event
        assertTrue(aes6.didConnectionClosedEventHappen());
        assertFalse(aes6.didConnectionErrorEventHappen());
        aes6.resetState();
       
        xar.start(xid, XAResource.TMJOIN);
        cs1 = xac.getConnection();
        // re-join with new handle X1
        assertConnectionState(
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.AssertEventCatcher.resetState()

        cs1.close();
        xar.end(xid, XAResource.TMSUCCESS);
        //Check if got connection closed event but not connection error event
        assertTrue(aes6.didConnectionClosedEventHappen());
        assertFalse(aes6.didConnectionErrorEventHappen());
        aes6.resetState();

        // now get a connection (attached to a local)
        // attach to the global and commit it.
        // state should be that of the local after the commit.
        cs1 = xac.getConnection();
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.AssertEventCatcher.resetState()

            Connection.TRANSACTION_REPEATABLE_READ,
            true, false, cs1);
        //Confirm - no connection closed event & connection error event
        assertFalse(aes6.didConnectionClosedEventHappen());
        assertFalse(aes6.didConnectionErrorEventHappen());
        aes6.resetState();
        cs1.close();
        //Check if got connection closed event but not connection error event
        assertTrue(aes6.didConnectionClosedEventHappen());
        assertFalse(aes6.didConnectionErrorEventHappen());
        aes6.resetState();
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.AssertEventCatcher.resetState()

        aes6.resetState();
        cs1.close();
        //Check if got connection closed event but not connection error event
        assertTrue(aes6.didConnectionClosedEventHappen());
        assertFalse(aes6.didConnectionErrorEventHappen());
        aes6.resetState();
    }
   
    // really part of testGlobalLocalInterLeaf:
    /**
     * @throws SQLException
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.AssertEventCatcher.resetState()

            Connection.TRANSACTION_READ_UNCOMMITTED,
            true, false, conn);
        //Confirm - no connection closed event & connection error event
        assertFalse(aes6.didConnectionClosedEventHappen());
        assertFalse(aes6.didConnectionErrorEventHappen());
        aes6.resetState();
    }

    // This test includes some short-hand descriptions of the test cases
    // left in for reference to the original non-junit test
    public void testReuseAcrossGlobalLocal() throws SQLException, XAException {
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.AssertEventCatcher.resetState()

        assertLocks(new int[] {14,14}, cs1);
        cs1.commit();
        //Confirm - no connection closed event & connection error event
        assertFalse(aes6.didConnectionClosedEventHappen());
        assertFalse(aes6.didConnectionErrorEventHappen());
        aes6.resetState();

        // attach the XA transaction to another connection and see what happens
        XAConnection xac2 = dsx.getXAConnection();
        AssertEventCatcher aes5 = new AssertEventCatcher(5);
        xac2.addConnectionEventListener(aes5);
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.