Skip to content

Commit

Permalink
other similar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxu0 committed Aug 15, 2018
1 parent 89a2f3b commit b3f71be
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 69 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2009-2016 the original author or authors.
* Copyright 2009-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@ public class XMLMapperEntityResolver implements EntityResolver {
private static final String MYBATIS_CONFIG_DTD = "org/apache/ibatis/builder/xml/mybatis-3-config.dtd";
private static final String MYBATIS_MAPPER_DTD = "org/apache/ibatis/builder/xml/mybatis-3-mapper.dtd";

/*
/**
* Converts a public DTD into a local one
*
* @param publicId The public id that is what comes after "PUBLIC"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2009-2017 the original author or authors.
* Copyright 2009-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,7 +41,7 @@ class PooledConnection implements InvocationHandler {
private int connectionTypeCode;
private boolean valid;

/*
/**
* Constructor for SimplePooledConnection that uses the Connection and PooledDataSource passed in
*
* @param connection - the connection that is to be presented as a pooled connection
Expand All @@ -57,14 +57,14 @@ public PooledConnection(Connection connection, PooledDataSource dataSource) {
this.proxyConnection = (Connection) Proxy.newProxyInstance(Connection.class.getClassLoader(), IFACES, this);
}

/*
/**
* Invalidates the connection
*/
public void invalidate() {
valid = false;
}

/*
/**
* Method to see if the connection is usable
*
* @return True if the connection is usable
Expand All @@ -73,7 +73,7 @@ public boolean isValid() {
return valid && realConnection != null && dataSource.pingConnection(this);
}

/*
/**
* Getter for the *real* connection that this wraps
*
* @return The connection
Expand All @@ -82,7 +82,7 @@ public Connection getRealConnection() {
return realConnection;
}

/*
/**
* Getter for the proxy for the connection
*
* @return The proxy
Expand All @@ -91,7 +91,7 @@ public Connection getProxyConnection() {
return proxyConnection;
}

/*
/**
* Gets the hashcode of the real connection (or 0 if it is null)
*
* @return The hashcode of the real connection (or 0 if it is null)
Expand All @@ -100,7 +100,7 @@ public int getRealHashCode() {
return realConnection == null ? 0 : realConnection.hashCode();
}

/*
/**
* Getter for the connection type (based on url + user + password)
*
* @return The connection type
Expand All @@ -109,7 +109,7 @@ public int getConnectionTypeCode() {
return connectionTypeCode;
}

/*
/**
* Setter for the connection type
*
* @param connectionTypeCode - the connection type
Expand All @@ -118,7 +118,7 @@ public void setConnectionTypeCode(int connectionTypeCode) {
this.connectionTypeCode = connectionTypeCode;
}

/*
/**
* Getter for the time that the connection was created
*
* @return The creation timestamp
Expand All @@ -127,7 +127,7 @@ public long getCreatedTimestamp() {
return createdTimestamp;
}

/*
/**
* Setter for the time that the connection was created
*
* @param createdTimestamp - the timestamp
Expand All @@ -136,7 +136,7 @@ public void setCreatedTimestamp(long createdTimestamp) {
this.createdTimestamp = createdTimestamp;
}

/*
/**
* Getter for the time that the connection was last used
*
* @return - the timestamp
Expand All @@ -145,7 +145,7 @@ public long getLastUsedTimestamp() {
return lastUsedTimestamp;
}

/*
/**
* Setter for the time that the connection was last used
*
* @param lastUsedTimestamp - the timestamp
Expand All @@ -154,7 +154,7 @@ public void setLastUsedTimestamp(long lastUsedTimestamp) {
this.lastUsedTimestamp = lastUsedTimestamp;
}

/*
/**
* Getter for the time since this connection was last used
*
* @return - the time since the last use
Expand All @@ -163,7 +163,7 @@ public long getTimeElapsedSinceLastUse() {
return System.currentTimeMillis() - lastUsedTimestamp;
}

/*
/**
* Getter for the age of the connection
*
* @return the age
Expand All @@ -172,7 +172,7 @@ public long getAge() {
return System.currentTimeMillis() - createdTimestamp;
}

/*
/**
* Getter for the timestamp that this connection was checked out
*
* @return the timestamp
Expand All @@ -181,7 +181,7 @@ public long getCheckoutTimestamp() {
return checkoutTimestamp;
}

/*
/**
* Setter for the timestamp that this connection was checked out
*
* @param timestamp the timestamp
Expand All @@ -190,7 +190,7 @@ public void setCheckoutTimestamp(long timestamp) {
this.checkoutTimestamp = timestamp;
}

/*
/**
* Getter for the time that this connection has been checked out
*
* @return the time
Expand All @@ -204,7 +204,7 @@ public int hashCode() {
return hashCode;
}

/*
/**
* Allows comparing this connection to another
*
* @param obj - the other connection to test for equality
Expand All @@ -221,7 +221,7 @@ public boolean equals(Object obj) {
}
}

/*
/**
* Required for InvocationHandler implementation.
*
* @param proxy - not used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void setDriverProperties(Properties driverProps) {
forceCloseAll();
}

/*
/**
* The maximum number of active connections
*
* @param poolMaximumActiveConnections The maximum number of active connections
Expand All @@ -160,7 +160,7 @@ public void setPoolMaximumActiveConnections(int poolMaximumActiveConnections) {
forceCloseAll();
}

/*
/**
* The maximum number of idle connections
*
* @param poolMaximumIdleConnections The maximum number of idle connections
Expand All @@ -170,7 +170,7 @@ public void setPoolMaximumIdleConnections(int poolMaximumIdleConnections) {
forceCloseAll();
}

/*
/**
* The maximum number of tolerance for bad connection happens in one thread
* which are applying for new {@link PooledConnection}
*
Expand All @@ -184,7 +184,7 @@ public void setPoolMaximumLocalBadConnectionTolerance(
this.poolMaximumLocalBadConnectionTolerance = poolMaximumLocalBadConnectionTolerance;
}

/*
/**
* The maximum time a connection can be used before it *may* be
* given away again.
*
Expand All @@ -195,7 +195,7 @@ public void setPoolMaximumCheckoutTime(int poolMaximumCheckoutTime) {
forceCloseAll();
}

/*
/**
* The time to wait before retrying to get a connection
*
* @param poolTimeToWait The time to wait
Expand All @@ -205,7 +205,7 @@ public void setPoolTimeToWait(int poolTimeToWait) {
forceCloseAll();
}

/*
/**
* The query to be used to check a connection
*
* @param poolPingQuery The query
Expand All @@ -215,7 +215,7 @@ public void setPoolPingQuery(String poolPingQuery) {
forceCloseAll();
}

/*
/**
* Determines if the ping query should be used.
*
* @param poolPingEnabled True if we need to check a connection before using it
Expand All @@ -225,7 +225,7 @@ public void setPoolPingEnabled(boolean poolPingEnabled) {
forceCloseAll();
}

/*
/**
* If a connection has not been used in this many milliseconds, ping the
* database to make sure the connection is still good.
*
Expand Down Expand Up @@ -497,7 +497,7 @@ private PooledConnection popConnection(String username, String password) throws
return conn;
}

/*
/**
* Method to check to see if a connection is still usable
*
* @param conn - the connection to check
Expand Down Expand Up @@ -551,7 +551,7 @@ protected boolean pingConnection(PooledConnection conn) {
return result;
}

/*
/**
* Unwraps a pooled connection to get to the 'real' connection
*
* @param conn - the pooled connection to unwrap
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/ibatis/io/ClassLoaderWrapper.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2009-2015 the original author or authors.
* Copyright 2009-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit b3f71be

Please sign in to comment.