Java Code Examples for com.sun.corba.se.pept.transport.Connection#writeUnlock()
The following examples show how to use
com.sun.corba.se.pept.transport.Connection#writeUnlock() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BufferManagerWriteStream.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private void sendFragment(boolean isLastFragment) { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); // REVISIT: need an ORB //System.out.println("sendFragment: last?: " + isLastFragment); conn.writeLock(); try { // Send the fragment conn.sendWithoutLock(((OutputObject)outputObject)); fragmentCount++; } finally { conn.writeUnlock(); } }
Example 2
Source File: BufferManagerWriteStream.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private void sendFragment(boolean isLastFragment) { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); // REVISIT: need an ORB //System.out.println("sendFragment: last?: " + isLastFragment); conn.writeLock(); try { // Send the fragment conn.sendWithoutLock(((OutputObject)outputObject)); fragmentCount++; } finally { conn.writeUnlock(); } }
Example 3
Source File: BufferManagerWriteStream.java From hottub with GNU General Public License v2.0 | 6 votes |
private void sendFragment(boolean isLastFragment) { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); // REVISIT: need an ORB //System.out.println("sendFragment: last?: " + isLastFragment); conn.writeLock(); try { // Send the fragment conn.sendWithoutLock(((OutputObject)outputObject)); fragmentCount++; } finally { conn.writeUnlock(); } }
Example 4
Source File: BufferManagerWriteStream.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private void sendFragment(boolean isLastFragment) { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); // REVISIT: need an ORB //System.out.println("sendFragment: last?: " + isLastFragment); conn.writeLock(); try { // Send the fragment conn.sendWithoutLock(((OutputObject)outputObject)); fragmentCount++; } finally { conn.writeUnlock(); } }
Example 5
Source File: BufferManagerWriteStream.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private void sendFragment(boolean isLastFragment) { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); // REVISIT: need an ORB //System.out.println("sendFragment: last?: " + isLastFragment); conn.writeLock(); try { // Send the fragment conn.sendWithoutLock(((OutputObject)outputObject)); fragmentCount++; } finally { conn.writeUnlock(); } }
Example 6
Source File: BufferManagerWriteStream.java From JDKSourceCode1.8 with MIT License | 6 votes |
private void sendFragment(boolean isLastFragment) { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); // REVISIT: need an ORB //System.out.println("sendFragment: last?: " + isLastFragment); conn.writeLock(); try { // Send the fragment conn.sendWithoutLock(((OutputObject)outputObject)); fragmentCount++; } finally { conn.writeUnlock(); } }
Example 7
Source File: BufferManagerWriteStream.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private void sendFragment(boolean isLastFragment) { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); // REVISIT: need an ORB //System.out.println("sendFragment: last?: " + isLastFragment); conn.writeLock(); try { // Send the fragment conn.sendWithoutLock(((OutputObject)outputObject)); fragmentCount++; } finally { conn.writeUnlock(); } }
Example 8
Source File: BufferManagerWriteGrow.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public void sendMessage () { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); conn.writeLock(); try { conn.sendWithoutLock((OutputObject)outputObject); sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 9
Source File: BufferManagerWriteGrow.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void sendMessage () { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); conn.writeLock(); try { conn.sendWithoutLock((OutputObject)outputObject); sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 10
Source File: BufferManagerWriteCollect.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public void sendMessage () { // Enqueue the last fragment queue.enqueue(((CDROutputObject)outputObject).getByteBufferWithInfo()); Iterator bufs = iterator(); Connection conn = ((OutputObject)outputObject).getMessageMediator(). getConnection(); // With the collect strategy, we must lock the connection // while fragments are being sent. This is so that there are // no interleved fragments in GIOP 1.1. // // Note that this thread must not call writeLock again in any // of its send methods! conn.writeLock(); try { // Get a reference to ByteBufferPool so that the ByteBufferWithInfo // ByteBuffer can be released to the ByteBufferPool ByteBufferPool byteBufferPool = orb.getByteBufferPool(); while (bufs.hasNext()) { ByteBufferWithInfo bbwi = (ByteBufferWithInfo)bufs.next(); ((CDROutputObject)outputObject).setByteBufferWithInfo(bbwi); conn.sendWithoutLock(((CDROutputObject)outputObject)); sentFragment = true; // Release ByteBufferWithInfo's ByteBuffer back to the pool // of ByteBuffers. if (debug) { // print address of ByteBuffer being released int bbAddress = System.identityHashCode(bbwi.byteBuffer); StringBuffer sb = new StringBuffer(80); sb.append("sendMessage() - releasing ByteBuffer id ("); sb.append(bbAddress).append(") to ByteBufferPool."); String msg = sb.toString(); dprint(msg); } byteBufferPool.releaseByteBuffer(bbwi.byteBuffer); bbwi.byteBuffer = null; bbwi = null; } sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 11
Source File: BufferManagerWriteCollect.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void sendMessage () { // Enqueue the last fragment queue.enqueue(((CDROutputObject)outputObject).getByteBufferWithInfo()); Iterator bufs = iterator(); Connection conn = ((OutputObject)outputObject).getMessageMediator(). getConnection(); // With the collect strategy, we must lock the connection // while fragments are being sent. This is so that there are // no interleved fragments in GIOP 1.1. // // Note that this thread must not call writeLock again in any // of its send methods! conn.writeLock(); try { // Get a reference to ByteBufferPool so that the ByteBufferWithInfo // ByteBuffer can be released to the ByteBufferPool ByteBufferPool byteBufferPool = orb.getByteBufferPool(); while (bufs.hasNext()) { ByteBufferWithInfo bbwi = (ByteBufferWithInfo)bufs.next(); ((CDROutputObject)outputObject).setByteBufferWithInfo(bbwi); conn.sendWithoutLock(((CDROutputObject)outputObject)); sentFragment = true; // Release ByteBufferWithInfo's ByteBuffer back to the pool // of ByteBuffers. if (debug) { // print address of ByteBuffer being released int bbAddress = System.identityHashCode(bbwi.byteBuffer); StringBuffer sb = new StringBuffer(80); sb.append("sendMessage() - releasing ByteBuffer id ("); sb.append(bbAddress).append(") to ByteBufferPool."); String msg = sb.toString(); dprint(msg); } byteBufferPool.releaseByteBuffer(bbwi.byteBuffer); bbwi.byteBuffer = null; bbwi = null; } sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 12
Source File: BufferManagerWriteCollect.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public void sendMessage () { // Enqueue the last fragment queue.enqueue(((CDROutputObject)outputObject).getByteBufferWithInfo()); Iterator bufs = iterator(); Connection conn = ((OutputObject)outputObject).getMessageMediator(). getConnection(); // With the collect strategy, we must lock the connection // while fragments are being sent. This is so that there are // no interleved fragments in GIOP 1.1. // // Note that this thread must not call writeLock again in any // of its send methods! conn.writeLock(); try { // Get a reference to ByteBufferPool so that the ByteBufferWithInfo // ByteBuffer can be released to the ByteBufferPool ByteBufferPool byteBufferPool = orb.getByteBufferPool(); while (bufs.hasNext()) { ByteBufferWithInfo bbwi = (ByteBufferWithInfo)bufs.next(); ((CDROutputObject)outputObject).setByteBufferWithInfo(bbwi); conn.sendWithoutLock(((CDROutputObject)outputObject)); sentFragment = true; // Release ByteBufferWithInfo's ByteBuffer back to the pool // of ByteBuffers. if (debug) { // print address of ByteBuffer being released int bbAddress = System.identityHashCode(bbwi.byteBuffer); StringBuffer sb = new StringBuffer(80); sb.append("sendMessage() - releasing ByteBuffer id ("); sb.append(bbAddress).append(") to ByteBufferPool."); String msg = sb.toString(); dprint(msg); } byteBufferPool.releaseByteBuffer(bbwi.byteBuffer); bbwi.byteBuffer = null; bbwi = null; } sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 13
Source File: BufferManagerWriteGrow.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public void sendMessage () { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); conn.writeLock(); try { conn.sendWithoutLock((OutputObject)outputObject); sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 14
Source File: BufferManagerWriteGrow.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void sendMessage () { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); conn.writeLock(); try { conn.sendWithoutLock((OutputObject)outputObject); sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 15
Source File: BufferManagerWriteGrow.java From JDKSourceCode1.8 with MIT License | 4 votes |
public void sendMessage () { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); conn.writeLock(); try { conn.sendWithoutLock((OutputObject)outputObject); sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 16
Source File: BufferManagerWriteCollect.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public void sendMessage () { // Enqueue the last fragment queue.enqueue(((CDROutputObject)outputObject).getByteBufferWithInfo()); Iterator bufs = iterator(); Connection conn = ((OutputObject)outputObject).getMessageMediator(). getConnection(); // With the collect strategy, we must lock the connection // while fragments are being sent. This is so that there are // no interleved fragments in GIOP 1.1. // // Note that this thread must not call writeLock again in any // of its send methods! conn.writeLock(); try { // Get a reference to ByteBufferPool so that the ByteBufferWithInfo // ByteBuffer can be released to the ByteBufferPool ByteBufferPool byteBufferPool = orb.getByteBufferPool(); while (bufs.hasNext()) { ByteBufferWithInfo bbwi = (ByteBufferWithInfo)bufs.next(); ((CDROutputObject)outputObject).setByteBufferWithInfo(bbwi); conn.sendWithoutLock(((CDROutputObject)outputObject)); sentFragment = true; // Release ByteBufferWithInfo's ByteBuffer back to the pool // of ByteBuffers. if (debug) { // print address of ByteBuffer being released int bbAddress = System.identityHashCode(bbwi.byteBuffer); StringBuffer sb = new StringBuffer(80); sb.append("sendMessage() - releasing ByteBuffer id ("); sb.append(bbAddress).append(") to ByteBufferPool."); String msg = sb.toString(); dprint(msg); } byteBufferPool.releaseByteBuffer(bbwi.byteBuffer); bbwi.byteBuffer = null; bbwi = null; } sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 17
Source File: BufferManagerWriteGrow.java From hottub with GNU General Public License v2.0 | 4 votes |
public void sendMessage () { Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection(); conn.writeLock(); try { conn.sendWithoutLock((OutputObject)outputObject); sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 18
Source File: BufferManagerWriteCollect.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public void sendMessage () { // Enqueue the last fragment queue.enqueue(((CDROutputObject)outputObject).getByteBufferWithInfo()); Iterator bufs = iterator(); Connection conn = ((OutputObject)outputObject).getMessageMediator(). getConnection(); // With the collect strategy, we must lock the connection // while fragments are being sent. This is so that there are // no interleved fragments in GIOP 1.1. // // Note that this thread must not call writeLock again in any // of its send methods! conn.writeLock(); try { // Get a reference to ByteBufferPool so that the ByteBufferWithInfo // ByteBuffer can be released to the ByteBufferPool ByteBufferPool byteBufferPool = orb.getByteBufferPool(); while (bufs.hasNext()) { ByteBufferWithInfo bbwi = (ByteBufferWithInfo)bufs.next(); ((CDROutputObject)outputObject).setByteBufferWithInfo(bbwi); conn.sendWithoutLock(((CDROutputObject)outputObject)); sentFragment = true; // Release ByteBufferWithInfo's ByteBuffer back to the pool // of ByteBuffers. if (debug) { // print address of ByteBuffer being released int bbAddress = System.identityHashCode(bbwi.byteBuffer); StringBuffer sb = new StringBuffer(80); sb.append("sendMessage() - releasing ByteBuffer id ("); sb.append(bbAddress).append(") to ByteBufferPool."); String msg = sb.toString(); dprint(msg); } byteBufferPool.releaseByteBuffer(bbwi.byteBuffer); bbwi.byteBuffer = null; bbwi = null; } sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 19
Source File: BufferManagerWriteCollect.java From hottub with GNU General Public License v2.0 | 4 votes |
public void sendMessage () { // Enqueue the last fragment queue.enqueue(((CDROutputObject)outputObject).getByteBufferWithInfo()); Iterator bufs = iterator(); Connection conn = ((OutputObject)outputObject).getMessageMediator(). getConnection(); // With the collect strategy, we must lock the connection // while fragments are being sent. This is so that there are // no interleved fragments in GIOP 1.1. // // Note that this thread must not call writeLock again in any // of its send methods! conn.writeLock(); try { // Get a reference to ByteBufferPool so that the ByteBufferWithInfo // ByteBuffer can be released to the ByteBufferPool ByteBufferPool byteBufferPool = orb.getByteBufferPool(); while (bufs.hasNext()) { ByteBufferWithInfo bbwi = (ByteBufferWithInfo)bufs.next(); ((CDROutputObject)outputObject).setByteBufferWithInfo(bbwi); conn.sendWithoutLock(((CDROutputObject)outputObject)); sentFragment = true; // Release ByteBufferWithInfo's ByteBuffer back to the pool // of ByteBuffers. if (debug) { // print address of ByteBuffer being released int bbAddress = System.identityHashCode(bbwi.byteBuffer); StringBuffer sb = new StringBuffer(80); sb.append("sendMessage() - releasing ByteBuffer id ("); sb.append(bbAddress).append(") to ByteBufferPool."); String msg = sb.toString(); dprint(msg); } byteBufferPool.releaseByteBuffer(bbwi.byteBuffer); bbwi.byteBuffer = null; bbwi = null; } sentFullMessage = true; } finally { conn.writeUnlock(); } }
Example 20
Source File: BufferManagerWriteCollect.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
public void sendMessage () { // Enqueue the last fragment queue.enqueue(((CDROutputObject)outputObject).getByteBufferWithInfo()); Iterator bufs = iterator(); Connection conn = ((OutputObject)outputObject).getMessageMediator(). getConnection(); // With the collect strategy, we must lock the connection // while fragments are being sent. This is so that there are // no interleved fragments in GIOP 1.1. // // Note that this thread must not call writeLock again in any // of its send methods! conn.writeLock(); try { // Get a reference to ByteBufferPool so that the ByteBufferWithInfo // ByteBuffer can be released to the ByteBufferPool ByteBufferPool byteBufferPool = orb.getByteBufferPool(); while (bufs.hasNext()) { ByteBufferWithInfo bbwi = (ByteBufferWithInfo)bufs.next(); ((CDROutputObject)outputObject).setByteBufferWithInfo(bbwi); conn.sendWithoutLock(((CDROutputObject)outputObject)); sentFragment = true; // Release ByteBufferWithInfo's ByteBuffer back to the pool // of ByteBuffers. if (debug) { // print address of ByteBuffer being released int bbAddress = System.identityHashCode(bbwi.byteBuffer); StringBuffer sb = new StringBuffer(80); sb.append("sendMessage() - releasing ByteBuffer id ("); sb.append(bbAddress).append(") to ByteBufferPool."); String msg = sb.toString(); dprint(msg); } byteBufferPool.releaseByteBuffer(bbwi.byteBuffer); bbwi.byteBuffer = null; bbwi = null; } sentFullMessage = true; } finally { conn.writeUnlock(); } }