Class SelRequest

java.lang.Object
org.metricshub.ipmi.client.SelRequest

public final class SelRequest extends Object
Reads the System Event Log: bmc.sel().execute() for every entry, bmc.sel().since(entry).execute() for the entries added after one already read.
  • Method Summary

    Modifier and Type
    Method
    Description
    Reads the entries: Get SEL Info, Get SEL Time UTC Offset, then one Get SEL Entry per entry, each read whole (so without a reservation, IPMI 2.0 section 31.5; one is taken when the BMC asks for it).
    since(int recordId)
    Reads only the entries added after the one with the given record ID, the ID of the last entry of a previous read, when that entry itself is not at hand (a cursor kept across restarts).
    since(SelEntry entry)
    Reads only the entries added after the given one, the last entry of a previous read: it is read again to find the next one and left out.
    timeout(Duration deadline)
    Overrides the deadline of the client for this request.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • since

      public SelRequest since(SelEntry entry)
      Reads only the entries added after the given one, the last entry of a previous read: it is read again to find the next one and left out. When the log holds another entry under its ID, or none (the log was cleared since, and its IDs started over), the whole log is read.
      Parameters:
      entry - the last entry already read
      Returns:
      this request
    • since

      public SelRequest since(int recordId)
      Reads only the entries added after the one with the given record ID, the ID of the last entry of a previous read, when that entry itself is not at hand (a cursor kept across restarts). When the log does not hold the ID any more (the log was cleared since), the whole log is read; but a log cleared and filled again up to that ID goes unnoticed, which since(SelEntry) catches: compare SelEntryList.lastErase() with the previous read to tell.
      Parameters:
      recordId - the record ID of the last entry already read, 1 to 65534
      Returns:
      this request
    • timeout

      public SelRequest timeout(Duration deadline)
      Overrides the deadline of the client for this request.
      Parameters:
      deadline - the time the request may take, session setup included
      Returns:
      this request
    • execute

      public SelEntryList execute()
      Reads the entries: Get SEL Info, Get SEL Time UTC Offset, then one Get SEL Entry per entry, each read whole (so without a reservation, IPMI 2.0 section 31.5; one is taken when the BMC asks for it). A log that changes while it is read (an entry deleted, the log cleared) is read again from the start, once, and whole: the entry given to since() may be another one by then.
      Returns:
      the entries, in the order of the log
      Throws:
      IpmiClientException - when the log cannot be read: the BMC does not answer, refuses an entry, returns a malformed one, or changed the log twice during the read