Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.database
Class PollCacheKey

java.lang.Object
  extended by com.jivesoftware.base.database.PollCacheKey
All Implemented Interfaces:
Cacheable, java.io.Serializable

public class PollCacheKey
extends java.lang.Object
implements Cacheable

Represents a key in the PollCache. All information needed to reload a cache entry is included in the key.

See Also:
Serialized Form

Constructor Summary
PollCacheKey(java.lang.String sql, int blockID)
          Creates a new PollCacheKey.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getBlockID()
          Returns the blockID of the key, or -1 if there is not a blockID.
 int getCachedSize()
          Returns the approximate size of the Object in bytes.
 java.lang.String getSql()
          Returns the sql query of the key.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PollCacheKey

public PollCacheKey(java.lang.String sql,
                    int blockID)
Creates a new PollCacheKey.

Parameters:
sql - the sql query for the cache entry data.
blockID - the blockID of the entry.
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSql

public java.lang.String getSql()
Returns the sql query of the key.

Returns:
the sql.

getBlockID

public int getBlockID()
Returns the blockID of the key, or -1 if there is not a blockID.

Returns:
the blockID, or -1 if not a blockID.

getCachedSize

public int getCachedSize()
Description copied from interface: Cacheable
Returns the approximate size of the Object in bytes. The size should be considered to be a best estimate of how much memory the Object occupies and may be based on empirical trials or dynamic calculations.

Specified by:
getCachedSize in interface Cacheable
Returns:
the size of the Object in bytes.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.