Package com.sun.sgs.service

Examples of com.sun.sgs.service.DataService.createReference()


      if (!(listener instanceof Serializable)) {
    throw new IllegalArgumentException("non-serializable listener");
      } else if (!(listener instanceof ManagedObject)) {
    listener = new ManagedSerializableChannelListener(listener);
      }
      this.listenerRef = dataService.createReference(listener);
  } else {
      this.listenerRef = null;
  }
  this.delivery = delivery;
  this.writeBufferCapacity = writeBufferCapacity;
View Full Code Here


      this.listenerRef = null;
  }
  this.delivery = delivery;
  this.writeBufferCapacity = writeBufferCapacity;
  this.txn = ChannelServiceImpl.getTransaction();
  ManagedReference<ChannelImpl> ref = dataService.createReference(this);
  this.wrappedChannelRef =
      dataService.createReference(new ChannelWrapper(ref));
  this.channelRefId = ref.getId();
  this.coordNodeId = getLocalNodeId();
  if (logger.isLoggable(Level.FINER)) {
View Full Code Here

  this.delivery = delivery;
  this.writeBufferCapacity = writeBufferCapacity;
  this.txn = ChannelServiceImpl.getTransaction();
  ManagedReference<ChannelImpl> ref = dataService.createReference(this);
  this.wrappedChannelRef =
      dataService.createReference(new ChannelWrapper(ref));
  this.channelRefId = ref.getId();
  this.coordNodeId = getLocalNodeId();
  if (logger.isLoggable(Level.FINER)) {
      logger.log(Level.FINER, "Created ChannelImpl:{0}",
           HexDumper.toHexString(channelRefId.toByteArray()));
View Full Code Here

      logger.log(Level.FINER, "Created ChannelImpl:{0}",
           HexDumper.toHexString(channelRefId.toByteArray()));
  }
  getChannelsMap().put(name, this);
  EventQueue eventQueue = new EventQueue(this);
  eventQueueRef = dataService.createReference(eventQueue);
  getEventQueuesMap(coordNodeId).
      put(channelRefId.toString(), eventQueue);
    }

    /** Returns the data service. */
 
View Full Code Here

  /**
   * Constructs an event queue for the specified {@code channel}.
   */
  EventQueue(ChannelImpl channel) {
      DataService dataService = getDataService();
      channelRef = dataService.createReference(channel);
      queueRef = dataService.createReference(
    new ManagedQueue<ChannelEvent>());
      writeBufferAvailable = channel.getWriteBufferCapacity();
  }

View Full Code Here

   * Constructs an event queue for the specified {@code channel}.
   */
  EventQueue(ChannelImpl channel) {
      DataService dataService = getDataService();
      channelRef = dataService.createReference(channel);
      queueRef = dataService.createReference(
    new ManagedQueue<ChannelEvent>());
      writeBufferAvailable = channel.getWriteBufferCapacity();
  }

  /**
 
View Full Code Here

  this.nodeId = sessionService.getLocalNodeId();
        this.maxMessageLength = maxMessageLength;
  writeBufferCapacity = sessionService.getWriteBufferSize();
  DataService dataService = sessionService.getDataService();
  ManagedReference<ClientSessionImpl> sessionRef =
      dataService.createReference(this);
  id = sessionRef.getId();
  this.wrappedSessionRef =
      dataService.createReference(new ClientSessionWrapper(sessionRef));
  idBytes = id.toByteArray();
  dataService.setServiceBinding(getSessionKey(), this);
View Full Code Here

  DataService dataService = sessionService.getDataService();
  ManagedReference<ClientSessionImpl> sessionRef =
      dataService.createReference(this);
  id = sessionRef.getId();
  this.wrappedSessionRef =
      dataService.createReference(new ClientSessionWrapper(sessionRef));
  idBytes = id.toByteArray();
  dataService.setServiceBinding(getSessionKey(), this);
  dataService.setServiceBinding(getSessionNodeKey(), this);
  dataService.setServiceBinding(getEventQueueKey(), new EventQueue(this));
  logger.log(Level.FINEST, "Stored session, identity:{0} id:{1}",
View Full Code Here

  /**
   * Constructs an event queue for the specified {@code sessionImpl}.
   */
  EventQueue(ClientSessionImpl sessionImpl) {
      DataService dataService = ClientSessionServiceImpl.getDataService();
      sessionRef = dataService.createReference(sessionImpl);
      queueRef = dataService.createReference(
    new ManagedQueue<SessionEvent>());
      writeBufferAvailable = sessionImpl.writeBufferCapacity;
  }

View Full Code Here

   * Constructs an event queue for the specified {@code sessionImpl}.
   */
  EventQueue(ClientSessionImpl sessionImpl) {
      DataService dataService = ClientSessionServiceImpl.getDataService();
      sessionRef = dataService.createReference(sessionImpl);
      queueRef = dataService.createReference(
    new ManagedQueue<SessionEvent>());
      writeBufferAvailable = sessionImpl.writeBufferCapacity;
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.