public boolean needsRefresh ( ) { boolean needsRefresh ; this . refreshLock . readLock ( ) . lock ( ) ; long now = System . currentTimeMillis ( ) ; long tokenDuration = ( now - this . lastRefresh ) ; needsRefresh = ( tokenDuration >= this . expires - REFRESH_EPSILON ) ; this . refreshLock . readLock ( ) . unlock ( ) ; return needsRefresh ; }
Determines if this connection s access token has expired and needs to be refreshed .