Class NetricsRecOp

    • Method Detail

      • Add

        public static NetricsRecOp Add​(NetricsRecord rec)
                                throws java.lang.IllegalArgumentException
        Create an Add Record Operation. A record add operation adds a new record to the ibi™ Patterns - Search table. If a record with the same key already exists the operation fails. If the do max work flag is set these failures are quietly ignored.
        Parameters:
        rec - the record to be added.
        Returns:
        a new NetricsRecOp object.
        Throws:
        java.lang.IllegalArgumentException - if rec is null.
      • Upd

        public static NetricsRecOp Upd​(NetricsRecord rec)
                                throws java.lang.IllegalArgumentException
        Create an Update Record Operation. A record update operation adds a record to the ibi™ Patterns - Search table if no record with the same key exists. If a record with the same key already exists the record is replaced with the given record.
        Parameters:
        rec - the record to be updated.
        Returns:
        a new NetricsRecOp object.
        Throws:
        java.lang.IllegalArgumentException - if rec is null.
      • Rpl

        public static NetricsRecOp Rpl​(NetricsRecord rec)
                                throws java.lang.IllegalArgumentException
        Create a Replace Record Operation. A record replace operation replaces an existing record in the ibi Patterns table with a new version. It is an error if a record with the same key doesn't exist. If the do max work flag is set the error is quietly ignored.
        Parameters:
        rec - the record to be replaced.
        Returns:
        a new NetricsRecOp object.
        Throws:
        java.lang.IllegalArgumentException - if rec is null.
      • Del

        public static NetricsRecOp Del​(NetricsRecord rec)
                                throws java.lang.IllegalArgumentException
        Create a Delete Record Operation. A record delete operation deletes an existing record in the ibi Patterns table. It is an error if a record with the same key doesn't exist. If the do max work flag is set the error is quietly ignored.
        Parameters:
        rec - the record to be deleted.
        Returns:
        a new NetricsRecOp object.
        Throws:
        java.lang.IllegalArgumentException - if rec is null.
      • Del

        public static NetricsRecOp Del​(java.lang.String key)
                                throws java.lang.IllegalArgumentException
        Create a Delete Record Operation given a record key.

        A record delete operation deletes an existing record in the ibi Patterns table. It is an error if a record with the same key doesn't exist. If the do max work flag is set the error is quietly ignored.

        A delete operation only needs a record key value. This method creates a delete operation given only the key, instead of a full record.

        Parameters:
        key - the key of the record to be deleted.
        Returns:
        a new NetricsRecOp object.
        Throws:
        java.lang.IllegalArgumentException - if key is null or zero length.
      • Del

        public static NetricsRecOp Del​(java.lang.String key,
                                       java.lang.String parent_key)
                                throws java.lang.IllegalArgumentException
        Create a Delete Record Operation given a record key and parent key.

        A record delete operation deletes an existing record in the ibi Patterns table. It is an error if a record with the same key doesn't exist. If the do max work flag is set the error is quietly ignored.

        A delete operation only needs a record key value. This method creates a delete operation for a child record given the key, and parent key. If parent_key is null or empty this creates a delete on a standard record.

        Parameters:
        key - the key of the child record to be deleted.
        parent_key - the parent key of the child record.
        Returns:
        a new NetricsRecOp object.
        Throws:
        java.lang.IllegalArgumentException - if key is null or zero length.
      • getOperation

        public NetricsRecOp.Op getOperation()
        Get the operation code for this Record Operation.
        Returns:
        the operation code for this record operation.
      • getRecord

        public NetricsRecord getRecord()
        Get the record being operated on by this operation.
        Returns:
        the record being operated on by this operation.
      • getKey

        public java.lang.String getKey()
        Get the record key of the record being operated on.
        Returns:
        the key value of the record being operated on.
      • getParentKey

        public java.lang.String getParentKey()
        Get the parent key of the record being operated on.
        Returns:
        the parent key value of the record, null or empty if this is not a child record.
      • toString

        public java.lang.String toString()
        Return a human readable form of this operation. The format is: <op-code>:<record-info> where op-code is the string value of the operation code fot this operation, and record-info is the string form of the record.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the human readable string form of this record operation.