Class DataClayException

    • Constructor Detail

      • DataClayException

        public DataClayException()
        Empty constructor used for deserialization.
      • DataClayException

        public DataClayException​(Throwable e)
      • DataClayException

        public DataClayException​(ErrorDefs.ERRORCODE theerrorCode)
        DataClayException constructor
        Parameters:
        theerrorCode - The error code
      • DataClayException

        public DataClayException​(ErrorDefs.ERRORCODE theerrorCode,
                                 String theexceptionMessage,
                                 boolean verbose)
        DataClayException constructor
        Parameters:
        theerrorCode - The error code
        theexceptionMessage - The exception message
        verbose - whether to pass cause of the exception or not
    • Method Detail

      • asGrpcException

        public io.grpc.StatusRuntimeException asGrpcException()
        Conversion from DataclayException to StatusRuntimeException for GRPC
        Returns:
        the representation of this DataClayException in terms of GRPC
      • setExceptionMessage

        public final void setExceptionMessage​(String newexceptionMessage)
        Set the DataClayException::exceptionMessage
        Parameters:
        newexceptionMessage - the exceptionMessage to set
      • getErrorcode

        public final ErrorDefs.ERRORCODE getErrorcode()
        Get the DataClayException::errorCode
        Returns:
        the errorCode
      • setErrorCode

        public final void setErrorCode​(ErrorDefs.ERRORCODE newerrorCode)
        Set the DataClayException::errorCode
        Parameters:
        newerrorCode - the errorCode to set
      • printStackTrace

        public final void printStackTrace()
        Print stack trace
        Overrides:
        printStackTrace in class Throwable
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object candidate)
        Overrides:
        equals in class Object
      • serialize

        public void serialize​(DataClayByteBuffer dcBuffer,
                              boolean ignoreUserTypes,
                              Map<MetaClassID,​byte[]> ifaceBitMaps,
                              IdentityHashMap<Object,​Integer> curSerializedObjs,
                              ListIterator<DataClayObject> pendingObjs,
                              ReferenceCounting referenceCounting)
        Description copied from interface: DataClaySerializable
        Serializes the object into the buffer provided using the interface represented in the bitmap specified.
        Specified by:
        serialize in interface DataClaySerializable
        Parameters:
        dcBuffer - Buffer in which to serialize the object
        ignoreUserTypes - Indicates if user types found during serialization must be ignored or not (for instance, non recursive make persistent)
        ifaceBitMaps - Map of bitmaps representing the interfaces to use
        curSerializedObjs - Current serialized objects Object -> OID tag. This structure must be different during each serialization since OID tags are not shared.
        pendingObjs - Pending objs.
        referenceCounting - Reference counting from this object.
      • deserialize

        public void deserialize​(DataClayByteBuffer dcByteBuffer,
                                Map<MetaClassID,​byte[]> ifaceBitMaps,
                                DataClayObjectMetaData metadata,
                                Map<Integer,​Object> curDeserializedJavaObjs)
        Description copied from interface: DataClaySerializable
        Deserializes the object from the buffer provided using the interface represented in the bitmap specified.
        Specified by:
        deserialize in interface DataClaySerializable
        Parameters:
        dcByteBuffer - Buffer from which to deserialize the object
        ifaceBitMaps - Map of bitmaps representing the interfaces to use
        metadata - Useful metadata of the object for execution
        curDeserializedJavaObjs - Currently deserialized Java objects