public synchronized void addRecord ( Record r , int cred , Object o ) { Name name = r . getName ( ) ; int type = r . getRRsetType ( ) ; if ( ! Type . isRR ( type ) ) return ; Element element = findElement ( name , type , cred ) ; if ( element == null ) { CacheRRset crrset = new CacheRRset ( r , cred , maxcache ) ; addRRset ( crrset , cred ) ; } else if ( element . compareCredibility ( cred ) == 0 ) { if ( element instanceof CacheRRset ) { CacheRRset crrset = ( CacheRRset ) element ; crrset . addRR ( r ) ; } } }
Adds a record to the Cache .