T - a type of Kubernetes resourcepublic abstract class AbstractEvent<T extends HasMetadata> extends EventObject
abstract EventObject that represents another
event that has occurred to a Kubernetes resource, usually as found
in an EventCache implementation.EventCache,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractEvent.Type
The type of an
AbstractEvent. |
source| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Returns
true if the supplied Object is also an
AbstractEvent and is equal in every respect to this one. |
Object |
getKey()
Returns a key that can be used to unambiguously identify this
AbstractEvent's resource. |
T |
getPriorResource()
Returns a
HasMetadata representing the prior
state of the Kubernetes resource this AbstractEvent
primarily concerns. |
T |
getResource()
Returns a
HasMetadata representing the Kubernetes
resource this AbstractEvent concerns. |
AbstractEvent.Type |
getType()
Returns a
AbstractEvent.Type representing the type of this AbstractEvent. |
int |
hashCode()
Returns a hashcode for this
AbstractEvent. |
boolean |
isFinalStateKnown()
Returns
true if this AbstractEvent's resource is an accurate representation of its
last known state. |
String |
toString()
Returns a
String representation of this AbstractEvent. |
getSourcepublic final AbstractEvent.Type getType()
AbstractEvent.Type representing the type of this AbstractEvent.
This method never returns null.
null AbstractEvent.TypeAbstractEvent.Typepublic final T getPriorResource()
HasMetadata representing the prior
state of the Kubernetes resource this AbstractEvent
primarily concerns.
This method may return null, and often does.
The prior state of a Kubernetes resource is often not known at
AbstractEvent construction time so it is common for this method
to return null.
HasMetadata representing the prior
state of the Kubernetes resource
this AbstractEvent primarily concerns, or nullgetResource()public final T getResource()
HasMetadata representing the Kubernetes
resource this AbstractEvent concerns.
This method never returns null.
null Kubernetes resourcepublic final boolean isFinalStateKnown()
true if this AbstractEvent's resource is an accurate representation of its
last known state.
This should only return true for some, but not all,
deletion scenarios. Any other behavior should be considered to
be an error.
true if this AbstractEvent's resource is an accurate representation of its
last known state; false otherwisepublic Object getKey()
AbstractEvent's resource.
This method may return null in exceptional cases, but
normally does not.
Overrides of this method must not return null except
in exceptional cases.
The default implementation of this method returns the return
value of the HasMetadatas.getKey(HasMetadata) method.
AbstractEvent, or nullHasMetadatas.getKey(HasMetadata)public int hashCode()
AbstractEvent.hashCode in class ObjectAbstractEventpublic boolean equals(Object other)
true if the supplied Object is also an
AbstractEvent and is equal in every respect to this one.equals in class Objectother - the Object to test; may be null in
which case false will be returnedtrue if the supplied Object is also an
AbstractEvent and is equal in every respect to this one; false otherwisepublic String toString()
String representation of this AbstractEvent.
This method never returns null.
Overrides of this method must not return null.
toString in class EventObjectnull String representation of this
AbstractEventCopyright © 2017–2021, microBean™. All rights reserved.