com.metamatrix.common.pooling.api
Class ResourceStatistics

java.lang.Object
  extended by com.metamatrix.common.pooling.api.ResourceStatistics
All Implemented Interfaces:
java.io.Serializable

public final class ResourceStatistics
extends java.lang.Object
implements java.io.Serializable

ResourceStatistics track the connection stats for a specific Resource instance so the ResoucePool knows

See Also:
Serialized Form

Constructor Summary
ResourceStatistics()
           
 
Method Summary
 void addConcurrentUser(java.lang.String userName)
          Adds a user to the current list of current users of the resource
 int getConcurrentUserCount()
          Returns the number of users currently using the resource
 long getCreationTime()
           
 long getLastUsed()
           
 java.lang.String getUserName()
           
 boolean hasConcurrentUsers()
          Returns true if the resource has current users
 void markAsUsed()
           
 void removeConcurrentUser(java.lang.String userName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceStatistics

public ResourceStatistics()
Method Detail

getConcurrentUserCount

public int getConcurrentUserCount()
Returns the number of users currently using the resource

Returns:
int is the number of current users

hasConcurrentUsers

public boolean hasConcurrentUsers()
Returns true if the resource has current users

Returns:
boolean of true if the resource has current users

addConcurrentUser

public void addConcurrentUser(java.lang.String userName)
Adds a user to the current list of current users of the resource

Parameters:
userName -

removeConcurrentUser

public void removeConcurrentUser(java.lang.String userName)

getCreationTime

public long getCreationTime()

getLastUsed

public long getLastUsed()

markAsUsed

public void markAsUsed()

getUserName

public java.lang.String getUserName()


Copyright © 2009. All Rights Reserved.