コード例 #1
0
    /** {@inheritDoc} */
    public void setObjectDescription(Transaction txn, T objId, Object description) {
      Objects.checkNull("txn", txn);
      Objects.checkNull("objId", objId);

      AccessedObjectsDetailImpl detail = txnMap.get(txn);
      if (detail == null) {
        throw new IllegalArgumentException("Unknown transaction: " + txn);
      }

      if (description != null) {
        detail.setDescription(source, objId, description);
      }
    }
コード例 #2
0
    /** {@inheritDoc} */
    public void reportObjectAccess(Transaction txn, T objId, AccessType type, Object description) {
      Objects.checkNull("txn", txn);
      Objects.checkNull("objId", objId);
      Objects.checkNull("type", type);

      AccessedObjectsDetailImpl detail = txnMap.get(txn);
      if (detail == null) {
        throw new IllegalArgumentException("Unknown transaction: " + txn);
      }
      detail.addAccess(new AccessedObjectImpl(objId, type, source, detail));
      if (description != null) {
        detail.setDescription(source, objId, description);
      }
    }