Top Description Fields Constructors Methods
io.netty.handler.codec.dns

public Class DefaultDnsRawRecord

extends AbstractDnsRecord
implements DnsRawRecord
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.dns.DnsRawRecord, io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted, io.netty.handler.codec.dns.DnsRecord
Annotations
@UnstableApi
Imports
io.netty.buffer.ByteBuf, io.netty.util.internal.StringUtil, .UnstableApi

The default DnsRawRecord implementation.

Field Summary

Modifier and TypeField and Description
private final ByteBuf

Constructor Summary

AccessConstructor and Description
public
DefaultDnsRawRecord(String
the domain name
name
,
DnsRecordType
the type of the record
type
,
long
the TTL value of the record
timeToLive
,
ByteBuf content)

Creates a new IN-class record.

public
DefaultDnsRawRecord(String
the domain name
name
,
DnsRecordType
the type of the record
type
,
int
the class of the record, usually one of the following:
dnsClass
,
long
the TTL value of the record
timeToLive
,
ByteBuf content)

Creates a new record.

Method Summary

Modifier and TypeMethod and Description
public ByteBuf
content()

Implements io.netty.buffer.ByteBufHolder.content.

Return the data which is held by this ByteBufHolder.
public DnsRawRecord
copy()

Implements io.netty.handler.codec.dns.DnsRawRecord.copy.

Creates a deep copy of this ByteBufHolder.
public DnsRawRecord
public int
refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object.
public boolean
release()

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
public boolean
release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
public DnsRawRecord
replace(ByteBuf content)

Implements io.netty.handler.codec.dns.DnsRawRecord.replace.

Returns a new ByteBufHolder which contains the specified content.
public DnsRawRecord
retain()

Implements io.netty.handler.codec.dns.DnsRawRecord.retain.

Increases the reference count by 1.
public DnsRawRecord
retain(int increment)

Implements io.netty.handler.codec.dns.DnsRawRecord.retain.

Increases the reference count by the specified increment.
public DnsRawRecord
public String
toString()

Overrides io.netty.handler.codec.dns.AbstractDnsRecord.toString.

Returns a string representation of the object.
public DnsRawRecord
touch()

Implements io.netty.handler.codec.dns.DnsRawRecord.touch.

Records the current access location of this object for debugging purposes.
public DnsRawRecord
touch(Object hint)

Implements io.netty.handler.codec.dns.DnsRawRecord.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
Inherited from io.netty.handler.codec.dns.AbstractDnsRecord:
dnsClassequalshashCodenametimeToLivetype

Field Detail

contentback to summary
private final ByteBuf content

Constructor Detail

DefaultDnsRawRecordback to summary
public DefaultDnsRawRecord(String name, DnsRecordType type, long timeToLive, ByteBuf content)

Creates a new IN-class record.

Parameters
name:String

the domain name

type:DnsRecordType

the type of the record

timeToLive:long

the TTL value of the record

DefaultDnsRawRecordback to summary
public DefaultDnsRawRecord(String name, DnsRecordType type, int dnsClass, long timeToLive, ByteBuf content)

Creates a new record.

Parameters
name:String

the domain name

type:DnsRecordType

the type of the record

dnsClass:int

the class of the record, usually one of the following:

timeToLive:long

the TTL value of the record

Method Detail

contentback to summary
public ByteBuf content()

Implements io.netty.buffer.ByteBufHolder.content.

Doc from io.netty.buffer.ByteBufHolder.content.

Return the data which is held by this ByteBufHolder.

Annotations
@Override
copyback to summary
public DnsRawRecord copy()

Implements io.netty.handler.codec.dns.DnsRawRecord.copy.

Doc from io.netty.buffer.ByteBufHolder.copy.

Creates a deep copy of this ByteBufHolder.

Annotations
@Override
duplicateback to summary
public DnsRawRecord duplicate()

Implements io.netty.handler.codec.dns.DnsRawRecord.duplicate.

Doc from io.netty.buffer.ByteBufHolder.duplicate.

Duplicates this ByteBufHolder. Be aware that this will not automatically call retain().

Annotations
@Override
refCntback to summary
public int refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Doc from io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object. If 0, it means this object has been deallocated.

Annotations
@Override
releaseback to summary
public boolean release()

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
releaseback to summary
public boolean release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
replaceback to summary
public DnsRawRecord replace(ByteBuf content)

Implements io.netty.handler.codec.dns.DnsRawRecord.replace.

Doc from io.netty.buffer.ByteBufHolder.replace.

Returns a new ByteBufHolder which contains the specified content.

Annotations
@Override
retainback to summary
public DnsRawRecord retain()

Implements io.netty.handler.codec.dns.DnsRawRecord.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public DnsRawRecord retain(int increment)

Implements io.netty.handler.codec.dns.DnsRawRecord.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.

Annotations
@Override
retainedDuplicateback to summary
public DnsRawRecord retainedDuplicate()

Implements io.netty.handler.codec.dns.DnsRawRecord.retainedDuplicate.

Doc from io.netty.buffer.ByteBufHolder.retainedDuplicate.

Duplicates this ByteBufHolder. This method returns a retained duplicate unlike duplicate().

Annotations
@Override
toStringback to summary
public String toString()

Overrides io.netty.handler.codec.dns.AbstractDnsRecord.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
touchback to summary
public DnsRawRecord touch()

Implements io.netty.handler.codec.dns.DnsRawRecord.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public DnsRawRecord touch(Object hint)

Implements io.netty.handler.codec.dns.DnsRawRecord.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector.

Annotations
@Override