All Packages  This Package  Class Hierarchy  Class Search  Index

Class posix.SharedMem
java.lang.Object
   |
   +----posix.IPC
           |
           +----posix.SharedMem

  Summary

public class  SharedMem
     extends posix.IPC
{
          // Fields 4
     public static final long SHMLBA;
     static final int SHM_RDONLY;
     static final int SHM_RND;
     static final int SHM_SIZE;

          // Constructors 2
     public SharedMem(int, int) throws IPCException;
     public SharedMem(String, int) throws IPCException;

          // Methods 5
     public synchronized CPtr attach() throws IPCException;
     public synchronized void dispose();
     public IPC.Perm getPerm() throws IPCException;
     public SharedMem.shmid_ds getStatus() throws IPCException;
     public void remove();

          // Inner Classes 1
     public static class SharedMem.shmid_ds
}

A Posix shared memory segment. Shared physical memory is not supported, since this requires superuser privilege and is very hardware dependent.

Author:
Stuart D. Gathman Copyright (C) 1998 Business Management Systems, Inc.

This code is distributed under the GNU Library General Public License

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.




  Fields

· SHM_SIZE

Summary  |  Top

   static final int SHM_SIZE


· SHM_RDONLY

Summary  |  Top
   static final int SHM_RDONLY


· SHM_RND

Summary  |  Top
   static final int SHM_RND


· SHMLBA

Summary  |  Top
   public static final long SHMLBA

The modulus for attaching shared memory by logical address. This is system dependent and therefore computed by the class initializer. While attaching shared memory to a specific address is somewhat system dependent, it is easily handled by configuration or property settings.


  Constructors

· SharedMem

Summary  |  Top

   public SharedMem(int key, 
                    int flag)  throws IPCException

Attach an existing shared memory segment.



· SharedMem

Summary  |  Top
   public SharedMem(String path, 
                    int type)  throws IPCException


  Methods

· getStatus

Summary  |  Top
   public SharedMem.shmid_ds getStatus()  throws IPCException


· getPerm

Summary  |  Top
   public IPC.Perm getPerm()  throws IPCException
Overrides:
getPerm in class IPC


· attach

Summary  |  Top
   public synchronized CPtr attach()  throws IPCException


· remove

Summary  |  Top
   public void remove() 
Overrides:
remove in class IPC


· dispose

Summary  |  Top
   public synchronized void dispose() 
Overrides:
dispose in class IPC


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7