Methods Summary |
---|
public synchronized void | access()
this.accessed = true;
this.lastAccess = System.currentTimeMillis();
|
public int | append(java.nio.ByteBuffer data, int len, boolean count)Append new bytes to buffer.
buffer.append(data,len);
int pkgCnt = -1;
if ( count ) pkgCnt = buffer.countPackages();
return pkgCnt;
|
public int | append(byte[] data, int off, int len, boolean count)
buffer.append(data,off,len);
int pkgCnt = -1;
if ( count ) pkgCnt = buffer.countPackages();
return pkgCnt;
|
public int | bufferSize()
return buffer.getLength();
|
public void | close()
this.buffer = null;
|
public int | count()Returns the number of packages that the reader has read
return buffer.countPackages();
|
public org.apache.catalina.tribes.ChannelMessage[] | execute()Send buffer to cluster listener (callback).
Is message complete receiver send message to callback?
int pkgCnt = buffer.countPackages();
ChannelMessage[] result = new ChannelMessage[pkgCnt];
for (int i=0; i<pkgCnt; i++) {
ChannelMessage data = buffer.extractPackage(true);
result[i] = data;
}
return result;
|
public synchronized void | finish()
this.accessed = false;
this.lastAccess = System.currentTimeMillis();
|
public long | getLastAccess()
return lastAccess;
|
public boolean | hasPackage()
return buffer.countPackages(true)>0;
|
public boolean | isAccessed()
return this.accessed;
|
public boolean | isCancelled()
return cancelled;
|
public void | setCancelled(boolean cancelled)
this.cancelled = cancelled;
|
public void | setLastAccess(long lastAccess)
this.lastAccess = lastAccess;
|