org.apache.directmemory.memory
Class PointerImpl<T>

java.lang.Object
  extended by org.apache.directmemory.memory.PointerImpl<T>
All Implemented Interfaces:
Pointer<T>

public class PointerImpl<T>
extends Object
implements Pointer<T>


Field Summary
 int bufferNumber
           
 Class<? extends T> clazz
           
 long created
           
 ByteBuffer directBuffer
           
 int end
           
 long expires
           
 long expiresIn
           
 boolean free
           
 long hits
           
 long lastHit
           
 int start
           
 
Constructor Summary
PointerImpl()
           
PointerImpl(int start, int end)
           
 
Method Summary
 byte[] content()
           
 void createdNow()
           
 int getBufferNumber()
           
 int getCapacity()
           
 Class<? extends T> getClazz()
           
 ByteBuffer getDirectBuffer()
           
 int getEnd()
           
 float getFrequency()
           
 int getStart()
           
 void hit()
           
 boolean isExpired()
           
 boolean isFree()
           
 void reset()
           
 void setBufferNumber(int bufferNumber)
           
 void setClazz(Class<? extends T> clazz)
           
 void setDirectBuffer(ByteBuffer directBuffer)
           
 void setEnd(int end)
           
 void setExpiration(long expires, long expiresIn)
           
 void setFree(boolean free)
           
 void setStart(int start)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

start

public int start

end

public int end

created

public long created

expires

public long expires

expiresIn

public long expiresIn

hits

public long hits

free

public boolean free

lastHit

public long lastHit

bufferNumber

public int bufferNumber

clazz

public Class<? extends T> clazz

directBuffer

public ByteBuffer directBuffer
Constructor Detail

PointerImpl

public PointerImpl()

PointerImpl

public PointerImpl(int start,
                   int end)
Method Detail

content

public byte[] content()
Specified by:
content in interface Pointer<T>

getFrequency

public float getFrequency()
Specified by:
getFrequency in interface Pointer<T>

getCapacity

public int getCapacity()
Specified by:
getCapacity in interface Pointer<T>

toString

public String toString()
Overrides:
toString in class Object

reset

public void reset()
Specified by:
reset in interface Pointer<T>

isFree

public boolean isFree()
Specified by:
isFree in interface Pointer<T>

isExpired

public boolean isExpired()
Specified by:
isExpired in interface Pointer<T>

getBufferNumber

public int getBufferNumber()
Specified by:
getBufferNumber in interface Pointer<T>

getStart

public int getStart()
Specified by:
getStart in interface Pointer<T>

getEnd

public int getEnd()
Specified by:
getEnd in interface Pointer<T>

setStart

public void setStart(int start)
Specified by:
setStart in interface Pointer<T>

hit

public void hit()
Specified by:
hit in interface Pointer<T>

getClazz

public Class<? extends T> getClazz()
Specified by:
getClazz in interface Pointer<T>

getDirectBuffer

public ByteBuffer getDirectBuffer()
Specified by:
getDirectBuffer in interface Pointer<T>

setFree

public void setFree(boolean free)
Specified by:
setFree in interface Pointer<T>

setEnd

public void setEnd(int end)
Specified by:
setEnd in interface Pointer<T>

setClazz

public void setClazz(Class<? extends T> clazz)
Specified by:
setClazz in interface Pointer<T>

setDirectBuffer

public void setDirectBuffer(ByteBuffer directBuffer)
Specified by:
setDirectBuffer in interface Pointer<T>

createdNow

public void createdNow()
Specified by:
createdNow in interface Pointer<T>

setBufferNumber

public void setBufferNumber(int bufferNumber)
Specified by:
setBufferNumber in interface Pointer<T>

setExpiration

public void setExpiration(long expires,
                          long expiresIn)
Specified by:
setExpiration in interface Pointer<T>


Copyright © 2011-2012 The Apache Software Foundation. All Rights Reserved.