- $onlyKeys allows to set database table columns that shall be used for
creating a cache key, this can be used to look for a node id/ip/port
combination instead of the default session id.
$searchInstance->setLimit(1);
// Query database and get a result instance back
- $resultInstance = $this->doSelectByCriteria($searchInstance);
+ $resultInstance = $this->doSelectByCriteria(
+ // Search instance
+ $searchInstance,
+ // Only look for these array elements ("keys")
+ array(
+ self::DB_COLUMN_NODE_ID,
+ self::DB_COLUMN_EXTERNAL_IP,
+ self::DB_COLUMN_LISTEN_PORT,
+ )
+ );
// Check if there is an entry
$isRegistered = $resultInstance->valid();